diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-27 22:45:40 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-07-03 14:34:14 +0200 |
commit | d89a98e31e6105a2194e41524d80c577cb014067 (patch) | |
tree | 67e38323419bd354c9878a774df8dfb5c4b767c7 /gdk/x11/gdkscreen-x11.c | |
parent | 525e5cff04f66b87314e91ef408525f02923c14b (diff) | |
download | gtk+-d89a98e31e6105a2194e41524d80c577cb014067.tar.gz |
x11: Support the Gdk/WindowScalingFactor xsetting
This xsetting can be used to tell Gtk to use a specific window
scaling for the screen.
Diffstat (limited to 'gdk/x11/gdkscreen-x11.c')
-rw-r--r-- | gdk/x11/gdkscreen-x11.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index cddb3de853..c615098e4a 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -1090,6 +1090,27 @@ _gdk_x11_screen_new (GdkDisplay *display, return screen; } +void +_gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen, + int scale) +{ + GList *toplevels, *l; + + if (x11_screen->window_scale == scale) + return; + + x11_screen->window_scale = scale; + + toplevels = gdk_screen_get_toplevel_windows (GDK_SCREEN (x11_screen)); + + for (l = toplevels; l != NULL; l = l->next) + { + GdkWindow *window = l->data; + + _gdk_x11_window_set_window_scale (window, scale); + } +} + /* * It is important that we first request the selection * notification, and then setup the initial state of |