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-08-24 16:55:52 -04:00
2021-08-24 19:55:22 +00:00
2021-08-19 16:29:45 +02:00
2021-08-27 18:07:39 -07:00
2020-04-26 14:41:52 -04:00
2020-02-04 14:08:10 +01:00
2020-01-17 23:46:37 -05:00
2020-04-06 16:32:03 -04:00
2021-07-28 22:42:46 -04:00
2021-07-28 22:42:46 -04:00
2020-08-05 15:49:00 +02:00
2021-05-27 00:18:23 +00:00
2020-07-25 00:47:36 +02:00
2020-07-25 00:47:36 +02:00
2020-12-24 06:38:45 +01:00
2021-05-22 17:25:26 -04:00
2020-09-25 15:00:07 +02:00
2021-05-22 17:25:26 -04:00
2019-11-27 13:33:43 +00:00
2020-08-29 11:11:29 +02:00
2021-08-22 18:49:12 +00:00
2019-11-27 13:33:43 +00:00
2019-04-02 15:10:53 +00:00
2020-07-21 14:45:12 -07:00
2019-11-27 13:33:43 +00:00
2019-11-27 13:33:43 +00:00
2019-03-17 21:29:59 +01:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2021-07-27 04:13:42 +02:00
2021-07-27 04:13:42 +02:00
2021-05-22 17:25:26 -04:00
2021-05-22 17:25:26 -04:00
2021-08-19 03:16:48 +02:00
2020-02-18 02:40:00 +01:00
2021-05-25 16:07:51 +00: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
2020-07-25 00:47:36 +02:00
2021-03-26 10:30:33 -04:00
2021-03-11 16:37:32 +00:00
2021-03-11 16:37:31 +00:00
2021-07-22 14:47:02 -04:00
2021-07-22 16:23:56 +02:00
2021-06-05 17:38:23 -04:00
2020-07-25 00:47:36 +02: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
2020-03-12 14:56:21 -04:00
2021-07-22 16:23:56 +02:00
2019-11-27 13:33:43 +00:00
2021-06-19 08:03:47 -07:00
2020-03-02 04:43:56 +01:00
2020-03-02 04:43:56 +01:00
2020-11-18 20:21:33 -08:00
2019-11-27 13:33:43 +00: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-07-28 22:42:46 -04:00
2020-12-07 09:46:39 +01:00
2021-03-11 16:37:31 +00:00
2019-11-27 13:33:43 +00:00
2021-05-22 17:25:26 -04:00
2021-07-27 21:01:31 +04:00
2021-07-22 16:27:31 +02:00
2021-07-22 16:27:32 +02: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-08-14 07:45:53 -04: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
2019-02-06 10:39:27 +01:00
2020-07-21 16:55:28 -04:00
2021-03-11 16:37:31 +00:00
2019-05-28 19:19:24 +02:00
2021-03-11 16:37:31 +00:00
2021-06-04 01:53:12 +00:00
2020-09-25 10:04:48 +02:00
2021-05-20 20:45:06 -04:00
2020-07-29 17:57:30 +02:00
2020-07-29 17:57:30 +02: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
2021-03-11 16:37:31 +00:00
2020-03-11 19:35:55 -04:00
2020-08-21 10:55:01 -04:00
2021-02-08 11:29:32 -08: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
2020-03-05 07:56:28 +01:00
2021-05-27 00:18:23 +00:00
2020-10-08 16:22:05 +02:00
2021-01-08 13:11:56 +01:00
2020-06-18 19:22:20 +01:00
2021-01-07 12:50:48 +01:00
2021-03-11 16:37:31 +00:00
2021-03-11 16:37:31 +00:00
2021-07-22 16:27:32 +02:00
2020-12-07 09:46:39 +01:00
2021-07-22 16:27:32 +02:00
2021-06-12 11:12:06 -04:00
2020-01-26 18:21:07 +01:00
2020-09-25 09:31:43 +02:00
2021-07-29 21:39:32 +02:00
2021-07-29 21:39:32 +02:00
2021-05-22 17:25:26 -04:00
2021-03-11 16:37:31 +00:00
2021-07-29 21:39:32 +02:00
2021-05-03 07:44:38 -04:00
2021-03-11 16:37:31 +00:00
2020-12-07 20:37:29 +01:00
2021-05-22 17:25:26 -04:00
2021-08-23 07:54:27 +02:00
2021-08-12 14:19:30 +02:00
2019-11-27 13:33:43 +00:00
2020-04-26 14:41:52 -04:00
2020-12-15 12:46:59 +00:00