cairo_image_surface_get_width() and cairo_image_surface_get_height()
return the image size that's in the device pixels.
On the other hand, _gdk_wayland_display_create_shm_surface() takes a
surface size in the logical pixels.
Given that _gdk_wayland_display_get_cursor_for_surface() provides the
desired surface size in device pixels, a much bigger shm surface is
created, which then breaks damage tracking code in
gdk_wayland_device_update_window_cursor().
Fixes#6242
gdk_keymap_get_entries_for_keyval is supposed to return FALSE when no
keys were found. Do so to prevent careless clients (that don't check
n_keys too) from crashing.
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.