gtk4.git
3 years agogdkkeys-win32: Ignore CTRL bit for key translation
Philip Zander [Sat, 29 Jan 2022 21:36:40 +0000 (22:36 +0100)]
gdkkeys-win32: Ignore CTRL bit for key translation

Some keymaps on Windows contain bogus mappings for Ctrl+key for certain
keys, e.g. Ctrl+Backspace = Delete, or Ctrl+[ = 0x1B. These are never
used on Windows, so we should ignore them.

Fixes #4667

3 years agoUpdate Chinese (China) translation
Boyuan Yang [Mon, 31 Jan 2022 03:51:23 +0000 (03:51 +0000)]
Update Chinese (China) translation

3 years agoUpdate Chinese (China) translation
Boyuan Yang [Mon, 31 Jan 2022 03:46:30 +0000 (03:46 +0000)]
Update Chinese (China) translation

3 years agoUpdate Japanese translation
sicklylife [Sun, 30 Jan 2022 15:26:50 +0000 (15:26 +0000)]
Update Japanese translation

3 years agoUpdate Japanese translation
sicklylife [Sun, 30 Jan 2022 15:15:27 +0000 (15:15 +0000)]
Update Japanese translation

3 years agoUpdate Polish translation
Piotr Drąg [Sat, 29 Jan 2022 13:59:17 +0000 (14:59 +0100)]
Update Polish translation

3 years agoUpdate Russian translation
Aleksandr Melman [Fri, 28 Jan 2022 11:05:57 +0000 (11:05 +0000)]
Update Russian translation

3 years agoMerge branch 'infobar-xml' into 'main'
Emmanuele Bassi [Fri, 28 Jan 2022 10:49:37 +0000 (10:49 +0000)]
Merge branch 'infobar-xml' into 'main'

Escape Builder XML in GtkInfoBar docs

See merge request GNOME/gtk!4421

3 years agoEscape Builder XML in GtkInfoBar docs
Elliott Sales de Andrade [Fri, 28 Jan 2022 10:32:16 +0000 (05:32 -0500)]
Escape Builder XML in GtkInfoBar docs

3 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 28 Jan 2022 10:01:09 +0000 (11:01 +0100)]
Updated Spanish translation

3 years agoMerge branch 'ebassi/manifest-dep-fix' into 'main'
Emmanuele Bassi [Fri, 28 Jan 2022 02:05:59 +0000 (02:05 +0000)]
Merge branch 'ebassi/manifest-dep-fix' into 'main'

flatpak: Add wayland-protocols to the manifests

See merge request GNOME/gtk!4420

3 years agoflatpak: Use "main" branch for wayland
Emmanuele Bassi [Fri, 28 Jan 2022 01:25:04 +0000 (01:25 +0000)]
flatpak: Use "main" branch for wayland

The default branch for wayland has changed, but the "master" branch
is still available with an older version.

3 years agoMerge branch 'tiled-window-bracket-fix' into 'main'
Matthias Clasen [Thu, 27 Jan 2022 17:29:13 +0000 (17:29 +0000)]
Merge branch 'tiled-window-bracket-fix' into 'main'

theme: Drop shadow and border fixes for tiled windows

See merge request GNOME/gtk!4418

3 years agoMerge branch 'wip/baedert/for-master' into 'main'
Matthias Clasen [Thu, 27 Jan 2022 16:27:12 +0000 (16:27 +0000)]
Merge branch 'wip/baedert/for-master' into 'main'

build: Make GCC ignore fallthrough comments

Closes #4663

See merge request GNOME/gtk!4419

3 years agoUpdate Brazilian Portuguese translation
Leônidas Araújo [Thu, 27 Jan 2022 16:25:07 +0000 (16:25 +0000)]
Update Brazilian Portuguese translation

3 years agoUpdate Brazilian Portuguese translation
Matheus Barbosa [Thu, 27 Jan 2022 15:47:53 +0000 (15:47 +0000)]
Update Brazilian Portuguese translation

3 years agogesturesingle: Get rid of a fallthrough comment
Timm Bäder [Thu, 27 Jan 2022 15:06:56 +0000 (16:06 +0100)]
gesturesingle: Get rid of a fallthrough comment

Fixes #4663

3 years agobuild: Make GCC ignore fallthrough comments
Timm Bäder [Thu, 27 Jan 2022 15:05:33 +0000 (16:05 +0100)]
build: Make GCC ignore fallthrough comments

From the GCC manpage:

> Wimplicit-fallthrough=5 doesn't recognize any comments as
> fallthrough comments, only attributes disable
> the warning.

So, check for the =5 version after checking for the simple version. This
way we get -Wfallhrough with clang and -Wfallthrough -Wfallthrough=5
with GCC, which works.

3 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 27 Jan 2022 14:47:37 +0000 (14:47 +0000)]
Update Ukrainian translation

3 years agoMerge branch 'realize-vs-focus-in' into 'main'
Carlos Garnacho [Thu, 27 Jan 2022 14:13:55 +0000 (14:13 +0000)]
Merge branch 'realize-vs-focus-in' into 'main'

gtktext: Make sure input method sees focus in

See merge request GNOME/gtk!4402

3 years agotheme: Fix incorrect border color for tiled windows
Joonas Henriksson [Thu, 27 Jan 2022 04:08:40 +0000 (06:08 +0200)]
theme: Fix incorrect border color for tiled windows

3 years agotheme: Fix drop shadow for tiled windows
Joonas Henriksson [Thu, 27 Jan 2022 03:50:06 +0000 (05:50 +0200)]
theme: Fix drop shadow for tiled windows

Misplaced curly bracket prevented the :backdrop styling from getting
applied. Also fix the indentation while at it.

3 years agoMerge branch 'hold-gestures' into 'main'
Carlos Garnacho [Wed, 26 Jan 2022 23:37:28 +0000 (23:37 +0000)]
Merge branch 'hold-gestures' into 'main'

Add hold gestures

See merge request GNOME/gtk!3454

3 years agoUpdate Galician translation
Fran Dieguez [Wed, 26 Jan 2022 23:36:27 +0000 (23:36 +0000)]
Update Galician translation

3 years agoUpdate Portuguese translation
Hugo Carvalho [Wed, 26 Jan 2022 22:48:02 +0000 (22:48 +0000)]
Update Portuguese translation

3 years agogtkgestureswipe: Don't filter hold events
José Expósito [Mon, 28 Jun 2021 15:51:17 +0000 (17:51 +0200)]
gtkgestureswipe: Don't filter hold events

Part-of: <!3454>

3 years agogtkgesturerotate: Don't filter hold events
José Expósito [Mon, 28 Jun 2021 15:51:13 +0000 (17:51 +0200)]
gtkgesturerotate: Don't filter hold events

Part-of: <!3454>

3 years agogtkgesturezoom: Don't filter hold events
José Expósito [Mon, 28 Jun 2021 15:50:56 +0000 (17:50 +0200)]
gtkgesturezoom: Don't filter hold events

Part-of: <!3454>

3 years agogtkgesture: Handle hold gestures
José Expósito [Mon, 28 Jun 2021 15:49:35 +0000 (17:49 +0200)]
gtkgesture: Handle hold gestures

Hold gestures are used to bring existing gestures on touchpad
semantically closer to touchscreen gestures.

Touchpad gestures observe hold gestures with a matching amount of
fingers and emit their begin and end signals when fingers are detected
or removed on/from the touchpad.

When a hold cancel event is detected, it is required to wait a few
milliseconds until the next event(s) are received to avoid emitting
multiple begin signals.

Part-of: <!3454>

3 years agogtkgesture: Add hold to EVENT_IS_TOUCHPAD_GESTURE
José Expósito [Mon, 28 Jun 2021 06:32:17 +0000 (08:32 +0200)]
gtkgesture: Add hold to EVENT_IS_TOUCHPAD_GESTURE

Part-of: <!3454>

3 years agoscrolledwindow: Stop kinetic scrolling on begin
José Expósito [Wed, 23 Jun 2021 06:09:35 +0000 (08:09 +0200)]
scrolledwindow: Stop kinetic scrolling on begin

Stop kinetic scrolling when a scroll begin signal is sent during the
event capture phase.

Part-of: <!3454>

3 years agokineticscrolling: Add stop function
José Expósito [Tue, 22 Jun 2021 16:44:05 +0000 (18:44 +0200)]
kineticscrolling: Add stop function

Move the logic to stop kinetic scrolling to its own function and allow
to call it from the outside.

Part-of: <!3454>

3 years agogtkeventcontrollerscroll: Handle hold gestures
José Expósito [Mon, 28 Jun 2021 15:48:04 +0000 (17:48 +0200)]
gtkeventcontrollerscroll: Handle hold gestures

Handle hold events:

 - GDK_TOUCHPAD_GESTURE_PHASE_BEGIN: scroll-begin is emitted.
 - GDK_TOUCHPAD_GESTURE_PHASE_END: A hold gesture ends only when all
   fingers are lifted from the touchpad without movement, so
   scroll-end is emitted right away.
 - GDK_TOUCHPAD_GESTURE_PHASE_CANCEL: A hold gesture is cancelled when
   some fingers are lifted/put down or movement is detected. In this
   case, scroll-end is emitted after a small timeout only if
   GDK_SCROLL wasn't detected.

Part-of: <!3454>

3 years agogtkeventcontrollerscroll: Refactor scroll end
José Expósito [Tue, 22 Jun 2021 16:27:14 +0000 (18:27 +0200)]
gtkeventcontrollerscroll: Refactor scroll end

Move the logic to end scrolling to its own function to be able to
reuse it.

Refactor, no functional changes.

Part-of: <!3454>

3 years agogtkeventcontrollerscroll: Refactor scroll begin
José Expósito [Fri, 18 Jun 2021 15:55:47 +0000 (17:55 +0200)]
gtkeventcontrollerscroll: Refactor scroll begin

Move the logic to begin scrolling to its own function to be able to
reuse it.

Refactor, no functional changes.

Part-of: <!3454>

3 years agowayland/pointer-gestures: Receive hold gesture
José Expósito [Sun, 27 Jun 2021 09:49:56 +0000 (11:49 +0200)]
wayland/pointer-gestures: Receive hold gesture

Add the glue code to receive hold gesture events from the compositor,
transform them into GdkEvents and finally enqueue them.

Part-of: <!3454>

3 years agogtkmain: Handle hold events
José Expósito [Sun, 27 Jun 2021 09:49:39 +0000 (11:49 +0200)]
gtkmain: Handle hold events

Part-of: <!3454>

3 years agogdk/events: Add hold GdkEvent
José Expósito [Sun, 27 Jun 2021 09:49:24 +0000 (11:49 +0200)]
gdk/events: Add hold GdkEvent

Allow to create hold events as well as the required functions to get
information about the event: gesture phase, finger count, etc

Part-of: <!3454>

3 years agobuild: Bump wayland-protocols to v1.23
José Expósito [Tue, 25 Jan 2022 17:05:18 +0000 (18:05 +0100)]
build: Bump wayland-protocols to v1.23

Part-of: <!3454>

3 years agoMerge branch 'sri-main-patch-28302' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:37:28 +0000 (19:37 +0000)]
Merge branch 'sri-main-patch-28302' into 'main'

Update docs/reference/gtk/migrating-3to4.md

See merge request GNOME/gtk!4404

3 years agoMerge branch 'rafaelff-hig' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:35:21 +0000 (19:35 +0000)]
Merge branch 'rafaelff-hig' into 'main'

buildertool: use curly apostrophe

See merge request GNOME/gtk!4414

3 years agoMerge branch 'wip/carlosg/touchpad-gesture-fixes' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:32:33 +0000 (19:32 +0000)]
Merge branch 'wip/carlosg/touchpad-gesture-fixes' into 'main'

Touchpad gesture fixes

See merge request GNOME/gtk!4417

3 years agoMerge branch 'antoniof-main-patch-39484' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:29:08 +0000 (19:29 +0000)]
Merge branch 'antoniof-main-patch-39484' into 'main'

gtkbitset: Define autocleanup function

See merge request GNOME/gtk!4416

3 years agoMerge branch 'bilelmoussaoui/g-i' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:19:42 +0000 (19:19 +0000)]
Merge branch 'bilelmoussaoui/g-i' into 'main'

g-i: mark GtkSnapshot to_(node|paintable) as nullable

See merge request GNOME/gtk!4413

3 years agogtk/gesture: Fix point info lookup on touchpad events
Carlos Garnacho [Wed, 26 Jan 2022 15:02:00 +0000 (16:02 +0100)]
gtk/gesture: Fix point info lookup on touchpad events

Since the addition of GdkEventSequence in touchpad events, these
are now stored in the gesture using that sequence. This bit of touchpad
gesture handling was however missing to be updated, still looking up
the special NULL sequence.

Use the last sequence here, which will be the one coming from touchpad
gesture events.

3 years agogtk/main: Do not use touchpad event sequence for pointer focus lookup
Carlos Garnacho [Wed, 26 Jan 2022 14:59:36 +0000 (15:59 +0100)]
gtk/main: Do not use touchpad event sequence for pointer focus lookup

Despite touchpad gestures having a sequence, these must use the logical
pointer focus. Avoid using the sequence for GtkPointerFocus lookups with
those events, in order to ensure those events make it all the way to the
intended target.

This is fallout from adding GdkEventSequence information to touchpad
gestures.

3 years agogdk: Always request "flush events" frame clock phase on events
Carlos Garnacho [Wed, 26 Jan 2022 14:49:29 +0000 (15:49 +0100)]
gdk: Always request "flush events" frame clock phase on events

This change is done for 2 reasons:

- The logic to request this phase when compressing scroll events is
  slightly broken. If there are multiple scroll events that are
  coalesced into one, the surface frame clock will not get this request.
  The worst case is having >= 2 scroll events on every frame, as the
  compressed event will be left in the queue, and be further compressed
  on future events.

- Even scroll events aside, this phase is requested in oddly specific
  places that are not enough to cover all events, others do rely on
  unrelated GdkFrameClock activity that happens to flush the events
  as well.

Unify this phase request so it explicitly happens on the arrival of any
event. This ensures that events (compressed or not) will be handled
promptly after arrival.

3 years agogtkbitset: Define autocleanup function
António Fernandes [Tue, 25 Jan 2022 21:33:31 +0000 (21:33 +0000)]
gtkbitset: Define autocleanup function

3 years agoMerge branch 'fix-popovermenu-removechild' into 'main'
Emmanuele Bassi [Tue, 25 Jan 2022 15:40:28 +0000 (15:40 +0000)]
Merge branch 'fix-popovermenu-removechild' into 'main'

popovermenu: Fix crash when removing child

See merge request GNOME/gtk!4393

3 years agopopovermenu: Fix crash when removing child
Kévin Commaille [Tue, 25 Jan 2022 14:31:00 +0000 (15:31 +0100)]
popovermenu: Fix crash when removing child

gtk_menu_section_box_remove_custom was looking in the wrong place for the
stack ancestor, causing an assertion error.

3 years agogtktext: Make sure input method sees focus in
Guido Günther [Wed, 19 Jan 2022 13:40:43 +0000 (14:40 +0100)]
gtktext: Make sure input method sees focus in

Currently when the widget is realized after the focus in event the input
method isn't activated as enable is never sent. The call trace is

  gtk_text_focus_changed ->
    gtk_im_context_focus_in ->
      gtk_im_context_wayland_focus_in

which returns early as self->widget is NULL since it's set up in
gtk_text_realize() via gtk_im_context_set_client_widget(). Handle that
case by invoking gtk_im_context_focus_in() from gtk_text_realize() too.

A case where the above happens is a GtkSearchEntry in a GtkSearchBar.
E.g. in gtk4-demo when starting the demo and then hitting the search
button right away.

3 years agoUpdate Chinese (China) translation
Boyuan Yang [Mon, 24 Jan 2022 19:46:37 +0000 (19:46 +0000)]
Update Chinese (China) translation

3 years agoUpdate Brazilian Portuguese translation
Leônidas Araújo [Mon, 24 Jan 2022 17:08:46 +0000 (17:08 +0000)]
Update Brazilian Portuguese translation

3 years agobuildertool: use curly apostrophe
Rafael Fontenelle [Mon, 24 Jan 2022 17:04:17 +0000 (17:04 +0000)]
buildertool: use curly apostrophe

3 years agog-i: mark GtkSnapshot to_(node|paintable) as nullable
Bilal Elmoussaoui [Sun, 23 Jan 2022 22:11:07 +0000 (22:11 +0000)]
g-i: mark GtkSnapshot to_(node|paintable) as nullable

Fixes an upstream issue reported at https://github.com/gtk-rs/gtk4-rs/issues/845

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 23 Jan 2022 15:19:39 +0000 (15:19 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use pango api better

See merge request GNOME/gtk!4412

3 years agoUse pango api better
Matthias Clasen [Sun, 23 Jan 2022 14:55:46 +0000 (09:55 -0500)]
Use pango api better

Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.#

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 23 Jan 2022 14:34:58 +0000 (14:34 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use pango api better

See merge request GNOME/gtk!4411

3 years agoUse pango api better
Matthias Clasen [Sun, 23 Jan 2022 14:09:57 +0000 (09:09 -0500)]
Use pango api better

Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 23 Jan 2022 04:29:58 +0000 (04:29 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use pango api better

See merge request GNOME/gtk!4409

3 years agoUse pango api better
Matthias Clasen [Sat, 22 Jan 2022 18:37:32 +0000 (13:37 -0500)]
Use pango api better

Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.

3 years agoUpdate Hebrew translation
Yaron Shahrabani [Fri, 21 Jan 2022 16:04:24 +0000 (16:04 +0000)]
Update Hebrew translation

3 years agoUpdate Hebrew translation
Yaron Shahrabani [Fri, 21 Jan 2022 15:53:39 +0000 (15:53 +0000)]
Update Hebrew translation

3 years agoMerge branch 'targz' into 'main'
Emmanuele Bassi [Wed, 19 Jan 2022 19:58:36 +0000 (19:58 +0000)]
Merge branch 'targz' into 'main'

ci: Put gtk dll into an archive

Closes #4653

See merge request GNOME/gtk!4403

3 years agoUpdate docs/reference/gtk/migrating-3to4.md
Sri Ramkrishna [Wed, 19 Jan 2022 19:24:01 +0000 (19:24 +0000)]
Update docs/reference/gtk/migrating-3to4.md

3 years agoci: Only use letters in "expose_as"
Guido Günther [Wed, 19 Jan 2022 15:39:44 +0000 (16:39 +0100)]
ci: Only use letters in "expose_as"

3 years agoci: Put gtk dll into an archive
Guido Günther [Wed, 19 Jan 2022 15:37:36 +0000 (16:37 +0100)]
ci: Put gtk dll into an archive

This avoids the wild card that makes the CI fail

3 years agoUpdate Chinese (China) translation
Dz Chen [Wed, 19 Jan 2022 15:44:00 +0000 (15:44 +0000)]
Update Chinese (China) translation

3 years agoMerge branch 'win32-gl-improvements' into 'main'
Matthias Clasen [Wed, 19 Jan 2022 13:49:40 +0000 (13:49 +0000)]
Merge branch 'win32-gl-improvements' into 'main'

Windows: Some fixes to GL context realization (EGL/GLES in particular)

See merge request GNOME/gtk!4386

3 years agoMerge branch 'bilelmoussaoui/g-i' into 'main'
Matthias Clasen [Wed, 19 Jan 2022 13:48:57 +0000 (13:48 +0000)]
Merge branch 'bilelmoussaoui/g-i' into 'main'

g-i: mark gtk_text_iter_get_child_anchor as nullable

See merge request GNOME/gtk!4401

3 years agoMerge branch 'provide-libgtk-dll-as-ci-artifact' into 'main'
Luca Bacci [Wed, 19 Jan 2022 11:17:28 +0000 (11:17 +0000)]
Merge branch 'provide-libgtk-dll-as-ci-artifact' into 'main'

Provide GTK DLL as GitLab CI artifact

See merge request GNOME/gtk!4395

3 years agoProvide GTK DLL as GitLab CI artifact
Luca Bacci [Wed, 19 Jan 2022 11:17:28 +0000 (11:17 +0000)]
Provide GTK DLL as GitLab CI artifact

3 years agoMerge branch 'context-early' into 'main'
Carlos Garnacho [Wed, 19 Jan 2022 10:48:48 +0000 (10:48 +0000)]
Merge branch 'context-early' into 'main'

gtkimcontextwayland: Remember context on focus-in so enable can happen later

See merge request GNOME/gtk!4397

3 years agog-i: mark gtk_text_iter_get_paintable as nullable
Bilal Elmoussaoui [Wed, 19 Jan 2022 10:22:40 +0000 (10:22 +0000)]
g-i: mark gtk_text_iter_get_paintable as nullable

3 years agogtkimcontextwayland: Save context even when text_input isn't around yet
Guido Günther [Tue, 18 Jan 2022 13:22:24 +0000 (14:22 +0100)]
gtkimcontextwayland: Save context even when text_input isn't around yet

Remember the current context on focus-in even though the text-input
isn't set up yet. This helps in the case where the text-input is not yet
created but a widget already got focused. Without that the enable()
invocation in text_input_enter() woulnd't be invoked leaving the input
method disabled.

This fixes

    gtk4-demo --run=search_entry

which would initially not show the on-screen keyboard when e.g using
phoc/sway as compositor.

3 years agog-i: mark gtk_text_iter_get_child_anchor as nullable
Bilal Elmoussaoui [Wed, 19 Jan 2022 10:18:40 +0000 (10:18 +0000)]
g-i: mark gtk_text_iter_get_child_anchor as nullable

3 years agogdkdisplay-win32.c: Clean up GL initialization further
Chun-wei Fan [Tue, 18 Jan 2022 16:18:07 +0000 (00:18 +0800)]
gdkdisplay-win32.c: Clean up GL initialization further

3 years agoGDK: Force GLES 3.0+ on libANGLE
Chun-wei Fan [Tue, 18 Jan 2022 16:16:11 +0000 (00:16 +0800)]
GDK: Force GLES 3.0+ on libANGLE

...when libANGLE is being used on Windows, by checking for a
Windows-specific an ANGLE-specific extension.

3 years agoCleanup "GDK/Win32: Try to fix initializing GLES contexts"
Chun-wei Fan [Tue, 18 Jan 2022 02:41:28 +0000 (10:41 +0800)]
Cleanup "GDK/Win32: Try to fix initializing GLES contexts"

As per Benjamin's suggestions, cleanup the previous implementation on
initializing the GLES context on Windows, so that we use more items that are
already in GDK proper and integrate two functions into one.

3 years agogdkglcontext-win32-wgl.c: Cleanup GL context creation
Chun-wei Fan [Mon, 17 Jan 2022 10:14:30 +0000 (18:14 +0800)]
gdkglcontext-win32-wgl.c: Cleanup GL context creation

Instead of first trying to explicitly ask for a WGL 4.1 context, ask for
the WGL context version that matches what is reported via
epoxy_gl_version(), so that we get the maximum WGL version that is
supported by the graphics drivers, and make sure any WGL contexts that
are shared with this (initial) WGL context are created likewise.

We can try to do a default-bog-standard 3.2 core WGL context creation
if the need arises, but let's leave that alone for now.

3 years agogdkglcontext.c: Ensure EGL contexts are in-sync with shared context
Chun-wei Fan [Mon, 17 Jan 2022 09:27:10 +0000 (17:27 +0800)]
gdkglcontext.c: Ensure EGL contexts are in-sync with shared context

The EGL context that we are actually creating must have matching OpenGL/ES
versions and allowed GL API set with the previously-created EGL context
that will be shared with it so that they can interoperate together, if
applicable.

This will fix the situation by making sure that we request for the
OpenGL/ES version and OpenGL API set that match with what we have in our shared
EGL context.  Otherwise, the newly-created EGL context assumed a OpenGL/ES 2.0
context that supported desktop OpenGL, which may not be what we wanted, such as
in the case of libANGLE.

3 years agoGDK/Win32: Try to fix initializing GLES contexts
Chun-wei Fan [Mon, 17 Jan 2022 08:11:27 +0000 (16:11 +0800)]
GDK/Win32: Try to fix initializing GLES contexts

We are now able to create EGL contexts properly on Windows, but not GLES.  This
tries to fix things by doing the following:

*  Record the GL context type in a more proper fashion, using an Enum.  This
   makes things a bit cleaner.
*  Force GLES-3.0+ contexts, since libANGLE requires this to properly work with
   the shaders-its 2.0 contexts don't work well with our shaders.

3 years agogskrenderer.c: Use GL renderer on Windows by default
Chun-wei Fan [Mon, 17 Jan 2022 06:40:23 +0000 (14:40 +0800)]
gskrenderer.c: Use GL renderer on Windows by default

Since now we have the shaders working on Windows under GLES with libANGLE using
a 3.0+ context, drop the check to fall back to the Cairo renderer when GLES is
being used.

3 years agoMerge branch 'wip/wayland-surface-offset' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:48:26 +0000 (23:48 +0000)]
Merge branch 'wip/wayland-surface-offset' into 'main'

Fix DND hotspot position under Wayland + EGL/Vulkan

See merge request GNOME/gtk!3705

3 years agoMerge branch 'gdksurface-wayland-assert' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:46:59 +0000 (23:46 +0000)]
Merge branch 'gdksurface-wayland-assert' into 'main'

gdksurface-wayland: Fix contradictory assert

See merge request GNOME/gtk!4385

3 years agoMerge branch 'gsk-transform-nullable' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:44:23 +0000 (23:44 +0000)]
Merge branch 'gsk-transform-nullable' into 'main'

Mark various GskTransform functions as nullable in their return value

See merge request GNOME/gtk!4378

3 years agoMerge branch 'document_shortcut_func_ret' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:41:15 +0000 (23:41 +0000)]
Merge branch 'document_shortcut_func_ret' into 'main'

gtk: document return value of ShortcutFunc

See merge request GNOME/gtk!4389

3 years agoMerge branch 'wip/dont-always-restore-saved-gtk4' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:40:49 +0000 (23:40 +0000)]
Merge branch 'wip/dont-always-restore-saved-gtk4' into 'main'

wayland: Don't always restore the saved size when floating

Closes #4634

See merge request GNOME/gtk!4394

3 years agoMerge branch 'build-post-install-query-media-modules' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:39:26 +0000 (23:39 +0000)]
Merge branch 'build-post-install-query-media-modules' into 'main'

Meson: Also query media modules in post-install

See merge request GNOME/gtk!4380

3 years agoMerge branch 'ebassi/fix-release-test' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 15:07:37 +0000 (15:07 +0000)]
Merge branch 'ebassi/fix-release-test' into 'main'

reftest: Avoid assertions being compiled out

See merge request GNOME/gtk!4391

3 years agowayland: Don't always restore the saved size when floating
Jonas Ådahl [Tue, 18 Jan 2022 14:45:30 +0000 (15:45 +0100)]
wayland: Don't always restore the saved size when floating

We only save the size when we transition from floating to fixed, so that
we can restore the size to the one prior to being fixed.

However, we should not restore to this size whenever we see a 0x0 size
from xdg_toplevel, as it can do that any time it doesn't care about the
size, e.g. when the surface is floating and just changing state.

Fix this by only using the saved size when transitioning from fixed to
floating, not when staying floating while previously floating.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4634
3 years agoreftest: Avoid assertions being compiled out
Emmanuele Bassi [Tue, 18 Jan 2022 12:30:47 +0000 (12:30 +0000)]
reftest: Avoid assertions being compiled out

Calling functions inside a g_assert() means those functions will be
compiled out when building with G_DISABLE_ASSERT.

This fixes the release job in the CI pipeline.

3 years agogtk: document return value of ShortcutFunc
Alexandros Theodotou [Tue, 18 Jan 2022 10:58:47 +0000 (10:58 +0000)]
gtk: document return value of ShortcutFunc

3 years agoMerge branch 'fix-keyboard-shortcuts-win32' into 'main'
Luca Bacci [Mon, 17 Jan 2022 13:34:17 +0000 (13:34 +0000)]
Merge branch 'fix-keyboard-shortcuts-win32' into 'main'

Win32 key events cleanup

See merge request GNOME/gtk!4349

3 years agoGdkWin32: Add translation result w/o CAPS LOCK to key events for accelerator matching
Luca Bacci [Fri, 14 Jan 2022 18:26:07 +0000 (19:26 +0100)]
GdkWin32: Add translation result w/o CAPS LOCK to key events for accelerator matching

3 years agoGdkWin32: Remove _gdk_input_codepage variable
Luca Bacci [Fri, 14 Jan 2022 14:09:48 +0000 (15:09 +0100)]
GdkWin32: Remove _gdk_input_codepage variable

It's unused

3 years agoGdkWin32: Code reorganization for gdk_event_translate
Luca Bacci [Fri, 14 Jan 2022 13:47:29 +0000 (14:47 +0100)]
GdkWin32: Code reorganization for gdk_event_translate

3 years agoMerge branch 'ebassi/issue-4596' into 'main'
Matthias Clasen [Mon, 17 Jan 2022 12:58:01 +0000 (12:58 +0000)]
Merge branch 'ebassi/issue-4596' into 'main'

i18n: Detect more translatable attribute values

Closes #4596

See merge request GNOME/gtk!4383

3 years agoMerge branch 'win32-imcontextime-ignore-control-characters' into 'main'
Luca Bacci [Mon, 17 Jan 2022 11:44:12 +0000 (11:44 +0000)]
Merge branch 'win32-imcontextime-ignore-control-characters' into 'main'

Fix handling of control characters & remove Win32-specific hacks from gdkkeyuni.c

Closes #2865

See merge request GNOME/gtk!4387

3 years agoGtkIMContextIME: Ignore ASCII control characters
Philip Zander [Mon, 17 Jan 2022 10:56:48 +0000 (11:56 +0100)]
GtkIMContextIME: Ignore ASCII control characters

Make GtkIMContextIME ignore ASCII control characters just like other
IMContext implementations (e.G. GtkIMContextSimple). Fixes bogus
characters appearing in text input fields (old bug 676077).