Files
gtk/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
..
2021-07-28 22:42:46 -04:00
2021-05-27 00:18:23 +00:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2019-11-27 13:33:43 +00:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2021-06-05 17:38:23 -04:00
2020-10-29 07:40:30 -04:00
2021-07-22 16:28:16 +02:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2020-07-25 00:47:36 +02:00
2021-03-11 16:37:31 +00:00
2021-07-22 14:47:02 -04:00
2021-06-05 17:38:23 -04:00
2021-07-22 16:27:32 +02:00
2021-05-20 20:45:06 -04:00
2021-03-11 16:37:31 +00:00
2020-07-25 00:47:36 +02:00
2021-05-22 17:25:26 -04:00
2020-04-03 15:30:56 +01:00
2021-06-19 08:03:47 -07:00
2020-03-02 04:43:56 +01:00
2021-05-22 17:25:26 -04:00
2021-05-20 19:17:49 -04:00
2021-05-22 17:25:26 -04:00
2021-06-05 17:38:23 -04:00
2021-03-11 16:37:31 +00:00
2021-03-11 16:37:31 +00:00
2021-05-22 17:25:26 -04:00
2020-10-01 19:33:43 -04:00
2021-03-11 16:37:31 +00:00
2021-03-11 16:37:31 +00:00
2020-07-25 00:47:36 +02:00
2021-05-22 17:25:26 -04:00
2020-07-25 00:47:36 +02:00
2020-07-25 00:47:36 +02:00
2020-07-21 16:55:28 -04:00
2021-03-11 16:37:31 +00:00
2021-03-11 16:37:31 +00:00
2021-05-20 20:45:06 -04:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2021-05-20 19:17:49 -04:00
2020-07-25 00:47:36 +02:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2020-07-25 00:47:36 +02:00
2021-05-22 17:25:26 -04:00
2021-03-11 16:37:31 +00:00
2021-05-22 21:21:10 -04:00
2020-03-11 19:35:55 -04:00
2021-05-22 17:25:26 -04:00
2019-11-27 13:33:43 +00:00
2021-05-20 19:17:49 -04:00
2020-07-25 00:47:36 +02:00
2021-05-27 00:18:23 +00:00
2021-03-11 16:37:31 +00:00
2021-03-11 16:37:31 +00:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2021-08-23 07:54:27 +02:00