hidpi: Rescan monitors when screen scale factor changes

All the code in e.g. init_randr15() divides the physical resolutions with
the screen scale, however if we get the screen scale from xsettings
rather than e.g. GDK_SCALE the initial setup is using the wrong value.

So, whenever the screen scale size is changed we need to trigger
a re-read of the randr data
This commit is contained in:
Alexander Larsson 2020-02-10 15:19:32 +01:00
parent e123fff545
commit 23211bcae8

View File

@ -49,6 +49,7 @@
static void gdk_x11_screen_dispose (GObject *object);
static void gdk_x11_screen_finalize (GObject *object);
static void init_randr_support (GdkX11Screen *screen);
static void process_monitors_change (GdkX11Screen *screen);
enum
{
@ -963,6 +964,9 @@ _gdk_x11_screen_set_surface_scale (GdkX11Screen *x11_screen,
gdk_monitor_set_scale_factor (monitor, scale);
}
/* We re-read the monitor sizes so we can apply the new scale */
process_monitors_change (x11_screen);
}
static void