The color channels are swapped on Linux too, not only on Windows. It can be
reproduced by running the "OpenGL Area" example from gtk3-demo with
GDK_GL=gles, or play a video in totem with GDK_GL=gles.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3032
I was profiling Firefox startup on Wayland, and I realized that we were
doing too much work because we get extra settings changed events, posted
from here:
#0 gdk_event_copy (event=0x7ffe9c4a7fd0) at ../gtk/gdk/gdkevents.c:659
#1 0x00007f8b8a5060c6 in gdk_display_put_event (event=0x7ffe9c4a7fd0, display=0x7f8b8d551a00) at ../gtk/gdk/gdkdisplay.c:503
#2 gdk_display_put_event (display=0x7f8b8d551a00, event=0x7ffe9c4a7fd0) at ../gtk/gdk/gdkdisplay.c:497
#3 0x00007f8b8a5456e6 in notify_setting (setting=0x7f8b8a59b6d6 "gtk-xft-dpi", screen=0x7f8b8d517700) at ../gtk/gdk/wayland/gdkscreen-wayland.c:237
#4 update_xft_settings (screen=0x7f8b8d517700) at ../gtk/gdk/wayland/gdkscreen-wayland.c:513
#5 0x00007f8b8a53ef6d in init_settings (screen=0x7f8b8d517700) at ../gtk/gdk/wayland/gdkscreen-wayland.c:842
#6 _gdk_wayland_screen_new (display=0x7f8b8d551a00) at ../gtk/gdk/wayland/gdkscreen-wayland.c:1367
#7 _gdk_wayland_display_open (display_name=<optimized out>) at ../gtk/gdk/wayland/gdkdisplay-wayland.c:618
#8 0x00007f8b8a507bc7 in gdk_display_manager_open_display (manager=<optimized out>, name=0x0) at ../gtk/gdk/gdkdisplaymanager.c:462
#9 0x00007f8b82bda2f8 in XREMain::XRE_mainStartup(bool*) (this=this@entry=0x7ffe9c4a8398, aExitFlag=aExitFlag@entry=0x7ffe9c4a830f) at /home/emilio/src/moz/gecko-6/toolkit/xre/nsAppRunner.cpp:4760
#10 0x00007f8b82be1742 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) (this=this@entry=0x7ffe9c4a8398, argc=argc@entry=4, argv=argv@entry=0x7ffe9c4a9698, aConfig=...) at /home/emilio/src/moz/gecko-6/toolkit/xre/nsAppRunner.cpp:5874
#11 0x00007f8b82be1c2c in XRE_main(int, char**, mozilla::BootstrapConfig const&) (argc=4, argv=0x7ffe9c4a9698, aConfig=...) at /home/emilio/src/moz/gecko-6/toolkit/xre/nsAppRunner.cpp:5942
#12 0x000055631ef3b3e9 in do_main(int, char**, char**) (argc=4, argv=0x7ffe9c4a9698, envp=<optimized out>) at /home/emilio/src/moz/gecko-6/browser/app/nsBrowserApp.cpp:227
#13 main(int, char**, char**) (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /home/emilio/src/moz/gecko-6/browser/app/nsBrowserApp.cpp:445
We shouldn't post events for a screen we're just creating, because it
can make apps do too much work during startup. X11 had code for this.
GDK_WINDOW_TEMP is set only for GTK_WINDOW_POPUP. If the type_hint
is left at the default GDK_WINDOW_TYPE_HINT_NORMAL the Quartz WM
will fullscreen it, which isn't desirable for popup menus or other
popups.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5716
Table (cell) row and column indices both start at 0, so
an index of 0 is valid.
Adapt the check accordingly and check for non-negative
indices instead of positive ones.
(`gtk_cell_accessible_parent_get_cell_position` sets -1
in the fallback case, so that's still handled as it used
to be.)
This fixes reporting the position of the table cell at
index (0,0) via AT-SPI.
Fixes: #5161
This mapping of stylus evdev input event codes into GDK button numbers
makes gdk/wayland inconsistent with gdk/x11, so depending on the backend
the same button middle-click pastes or right-click pops up menus.
Make the wayland backend consistent with X11, so that a GNOME wayland
session gets these buttons consistently mapped across all kinds of
clients.
(cherry-picked from commit e28ff79bec53ecd56885390ba4a66019cde598c6)
There is no need to include gdkquartz.h there,
which was making it impossible to include this header file
without also adding gdk/ as an include directory when compiling.
This patch moves the include to the only location where it is actually needed.
Copy what we do in GTK4: Check for GL >= 3.2 or GLES >= 3.0 or the
GL_ARB_sync extension.
Then store that info for a (private) gdk_gl_context_has_sync()
function.
And then check that function before using GLsync objects as introduced
by commit 9811485990.
Fixes#5749