gtk2/gdk
Ian Douglas Scott 9e5a501c73 x11: Fix handling of RRScreenChangeNotify/RRNotify events
It seems these are sent with `xwindow` set to the root window, so this
was failing to find a surface and get the screen from that.

I'm not sure if there's a reason not to get the screen this way
elsewhere in the function, but it seems this should be correct.

This fixes the behavior of `gdk_x11_display_get_monitors()`, which
wasn't correctly changing when monitors were added or removed. For
instance, this python code was always showing the same number of
monitors when one was turned off and on, but updates correctly with this
change applied:

```python
import gi
gi.require_version("GLib", "2.0")
gi.require_version("Gdk", "4.0")
gi.require_version("Gtk", "4.0")
from gi.repository import GLib, Gdk, Gtk

def f():
    print(len(Gdk.Display.get_default().get_monitors()))
    return True
GLib.timeout_add_seconds(1, f)

GLib.MainLoop().run()
```
2021-08-27 18:07:39 -07:00
..
broadway Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
macos gdkmacoseventsource: Include "gdk-private.h" 2021-08-24 16:55:52 -04:00
resources/glsl Use GLSL version 110 for OpenGL 2 shaders. 2016-11-01 15:42:46 -03:00
wayland wayland: Better error on eglGetDisplay() failure 2021-08-24 19:55:22 +00:00
win32 Move the _gdk_win32_pointer_input_api global variable into GdkWin32Display 2021-08-19 16:29:45 +02:00
x11 x11: Fix handling of RRScreenChangeNotify/RRNotify events 2021-08-27 18:07:39 -07:00
COPYING Change FSF Address 2012-02-27 17:06:11 +00:00
default_cursor.png gdk: Include a default cursor as resource 2020-04-26 14:41:52 -04:00
filetransferportal.c filechooser portal: Free portal proxy when bus connection closes 2020-02-04 14:08:10 +01:00
filetransferportalprivate.h Tweak the file transfer portal _again_ 2020-01-17 23:46:37 -05:00
gdk-autocleanup.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdk-private.h Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
gdk.c Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
gdk.h gdk/toplevel: Negotiate surface size via a compute-size signal 2020-08-05 15:49:00 +02:00
gdkapplaunchcontext.c docs: fix broken links 2021-05-27 00:18:23 +00:00
gdkapplaunchcontext.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkapplaunchcontextprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkarrayimpl.c gdkarray: Add a "stolen" boolean to splice() 2020-12-24 06:38:45 +01:00
gdkcairo.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcairo.h Drop gdk_cairo_surface_upload_to_gl() helper 2020-09-25 15:00:07 +02:00
gdkcairocontext.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcairocontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkcairocontextprivate.h gdkcairocontext*.h: Include cairo.h consistently 2018-05-15 13:49:45 +08:00
gdkcairoprivate.h gdkcairoprivate: Fix header guard 2020-08-29 11:11:29 +02:00
gdkclipboard.c docs: Expand gdk_clipboard_set() docs 2021-08-22 18:49:12 +00:00
gdkclipboard.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkclipboardprivate.h gdk: Change some async clipboard api 2019-04-02 15:10:53 +00:00
gdkconfig.h.meson macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkconfig.h.win32 Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkconfig.h.win32_vulkan Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkconstructor.h gdk: Include copy of glib/gconstructor.h 2019-03-17 21:29:59 +01:00
gdkcontentdeserializer.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcontentdeserializer.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentformats.c contentformats: Add gdk_content_formats_parse() 2021-07-27 04:13:42 +02:00
gdkcontentformats.h contentformats: Add gdk_content_formats_parse() 2021-07-27 04:13:42 +02:00
gdkcontentformatsprivate.h gdk: Sanitize GdkContentFormats API 2017-11-20 23:15:11 +01:00
gdkcontentprovider.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentprovider.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentproviderimpl.c contentprovider: Switch wrong order in type check 2021-08-19 03:16:48 +02:00
gdkcontentproviderimpl.h Remove gdk_content_provider_new_with_formats() 2020-02-18 02:40:00 +01:00
gdkcontentproviderprivate.h clipboard: Introduce GdkContentProvider 2017-12-03 05:46:47 +01:00
gdkcontentserializer.c gdk: fix wrong doc annotation 2021-05-25 16:07:51 +00:00
gdkcontentserializer.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcursor.c Docs: Tweaks 2021-06-05 17:38:23 -04:00
gdkcursor.h Cosmetics 2020-10-29 07:40:30 -04:00
gdkcursorprivate.h gdk: Add gdk_cursor_hash() and gdk_cursor_equal() 2017-11-04 00:07:13 +01:00
gdkdebug.h GDK: Add debug option for WGL usage 2021-07-22 16:28:16 +02:00
gdkdevice.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevice.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevicepad.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevicepad.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkdevicepadprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkdeviceprivate.h gdk: Add gdk_device_get_timestamp 2021-03-26 10:30:33 -04:00
gdkdevicetool.c devicetool: Add property annotations 2021-03-11 16:37:32 +00:00
gdkdevicetool.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkdevicetoolprivate.h gdk: Pass hardware ID on gdk_device_tool_new() 2016-08-23 21:01:44 +02:00
gdkdisplay.c Add more sysprof marks 2021-07-22 14:47:02 -04:00
gdkdisplay.h gdk: Add GdkDisplay::init_gl vfunc 2021-07-22 16:23:56 +02:00
gdkdisplaymanager.c Docs: Tweaks 2021-06-05 17:38:23 -04:00
gdkdisplaymanager.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkdisplaymanagerprivate.h gdk: Unvfuncify gdk_display_manager_open_display() 2013-04-19 16:23:43 -04:00
gdkdisplayprivate.h gl: Move vfunc 2021-07-22 16:27:32 +02:00
gdkdrag.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdkdrag.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkdragprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkdragsurface.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdragsurface.h Annotation fixes 2020-04-03 15:30:56 +01:00
gdkdragsurfaceprivate.h Add a GdkDragSurface interface 2020-03-12 14:56:21 -04:00
gdkdrawcontext.c gdk: Allow GdkDrawContext with a %NULL surface 2021-07-22 16:23:56 +02:00
gdkdrawcontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkdrawcontextprivate.h drawcontext: Only pass the region that matters 2018-04-24 23:16:58 +02:00
gdkdrop.c docs: Tweak wording 2021-06-19 08:03:47 -07:00
gdkdrop.h drop: Remove unused convenience APIs 2020-03-02 04:43:56 +01:00
gdkdropprivate.h gdk: Make gdk_drop_status() take preferred action 2020-03-02 04:43:56 +01:00
gdkenumtypes.c.template types: fix various use of volatile in type registration 2020-11-18 20:21:33 -08:00
gdkenumtypes.h.template Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkevents.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkevents.h Documentation fixes 2021-05-20 19:17:49 -04:00
gdkeventsprivate.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkframeclock.c Docs: Tweaks 2021-06-05 17:38:23 -04:00
gdkframeclock.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkframeclockidle.c Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
gdkframeclockidleprivate.h frameclockidle: Rename header so it's private now 2018-03-29 05:02:15 +02:00
gdkframeclockprivate.h gdk/frame-clock: Remove the newly added 'compute-size' phase 2020-12-07 09:46:39 +01:00
gdkframetimings.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkframetimings.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkgl.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkglcontext.c gdk: add missing Since annotation 2021-07-27 21:01:31 +04:00
gdkglcontext.h gl: Deprecate gdk_gl_context_get_shared_context() 2021-07-22 16:27:31 +02:00
gdkglcontextprivate.h gdk: Move GL context construction to GdkGLContext 2021-07-22 16:27:32 +02:00
gdkglobals.c gdk: Remove an unused variable 2020-10-01 19:33:43 -04:00
gdkgltexture.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkgltexture.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkgltextureprivate.h texture: Expose subclasses as subclasses 2018-03-18 05:57:07 +01:00
gdkinternals.h gdk: Slim down gdkinternals.h more 2020-08-14 07:45:53 -04:00
gdkintl.h Change FSF Address 2012-02-27 17:06:11 +00:00
gdkkeynames.c Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkkeys.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkkeys.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkkeysprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkkeysyms-update.pl docs: Fix GTK links and locations 2019-02-06 10:39:27 +01:00
gdkkeysyms.h gdk: Update gdkkeysyms.h 2020-07-21 16:55:28 -04:00
gdkkeyuni.c gdk: Some more tweaks of the docs 2021-03-11 16:37:31 +00:00
gdkmarshalers.list surface: Add marshallers for new events 2019-05-28 19:19:24 +02:00
gdkmemorytexture.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkmemorytexture.h Apply 1 suggestion(s) to 1 file(s) 2021-06-04 01:53:12 +00:00
gdkmemorytextureprivate.h gl backend: Avoid roundtripping via surface when updloading 2020-09-25 10:04:48 +02:00
gdkmonitor.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdkmonitor.h gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area 2020-07-29 17:57:30 +02:00
gdkmonitorprivate.h gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area 2020-07-29 17:57:30 +02:00
gdkpaintable.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpaintable.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpango.c Documentation fixes 2021-05-20 19:17:49 -04:00
gdkpango.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkpipeiostream.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpipeiostreamprivate.h clipboard: Implement local fallback clipboard transfers 2017-12-03 05:46:47 +01:00
gdkpixbuf-drawable.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpixbuf.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkpopup.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpopup.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkpopuplayout.c docs: More syntax fixes 2021-05-22 21:21:10 -04:00
gdkpopuplayout.h docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
gdkpopupprivate.h Introduce GdkPopup 2020-03-11 19:35:55 -04:00
gdkprofiler.c Port tracing to the sysprof collector api 2020-08-21 10:55:01 -04:00
gdkprofilerprivate.h profiler: allow using gdk profiler functions without braces 2021-02-08 11:29:32 -08:00
gdkrectangle.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkrectangle.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkrgba.c Documentation fixes 2021-05-20 19:17:49 -04:00
gdkrgba.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkrgbaprivate.h build: Add more useful warning flags 2020-03-05 07:56:28 +01:00
gdkseat.c docs: fix broken links 2021-05-27 00:18:23 +00:00
gdkseat.h gdkseat: Make gdk_seat_get_tools() public 2020-10-08 16:22:05 +02:00
gdkseatdefault.c seatdefault: use g_clear_pointer to unref the tools 2021-01-08 13:11:56 +01:00
gdkseatdefaultprivate.h Rename master and slave device 2020-06-18 19:22:20 +01:00
gdkseatprivate.h seat: improve api to take into account the tool type 2021-01-07 12:50:48 +01:00
gdksnapshot.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdksnapshot.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdksnapshotprivate.h snapshot: Turn into GObject 2018-03-18 19:21:33 +01:00
gdksurface.c gdk: Move GL context construction to GdkGLContext 2021-07-22 16:27:32 +02:00
gdksurface.h gdk: Always get shadow width via GdkToplevelSize 2020-12-07 09:46:39 +01:00
gdksurfaceprivate.h gdk: Move GL context construction to GdkGLContext 2021-07-22 16:27:32 +02:00
gdktexture.c Add type annotations for filename arguments 2021-06-12 11:12:06 -04:00
gdktexture.h Add pure and const annotations to various functions 2020-01-26 18:21:07 +01:00
gdktextureprivate.h texture: Unvirtualize download_surface 2020-09-25 09:31:43 +02:00
gdktoplevel.c gdk/toplevel: Add gdk_toplevel_titlebar_gesture() 2021-07-29 21:39:32 +02:00
gdktoplevel.h gdk/toplevel: Add gdk_toplevel_titlebar_gesture() 2021-07-29 21:39:32 +02:00
gdktoplevellayout.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdktoplevellayout.h docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
gdktoplevelprivate.h gdk/toplevel: Add gdk_toplevel_titlebar_gesture() 2021-07-29 21:39:32 +02:00
gdktoplevelsize.c gdktoplevelsize: Comment out some unused code 2021-05-03 07:44:38 -04:00
gdktoplevelsize.h docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
gdktoplevelsizeprivate.h gdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width' 2020-12-07 20:37:29 +01:00
gdktypes.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkversionmacros.h.in Add 4.6 version macros 2021-08-23 07:54:27 +02:00
gdkvulkancontext.c gdk: Include Vulkan error code in vulkan_strerror() 2021-08-12 14:19:30 +02:00
gdkvulkancontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkvulkancontextprivate.h vulkan: Fix release builds 2018-01-21 15:23:17 +01:00
gen-gdk-gresources-xml.py gdk: Include a default cursor as resource 2020-04-26 14:41:52 -04:00
gen-keyname-table.pl gdk: Make gen-keyname-table.pl work again 2011-10-26 10:36:43 +01:00
keyname-table.h gdk: Translate some more key names 2017-10-09 20:33:14 +02:00
keynames-translate.txt gdk: Translate some more key names 2017-10-09 20:33:14 +02:00
keynames.txt Fix key "Page_Down" identified as "Next" 2013-10-24 18:48:33 -04:00
meson.build build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00