Make window scale changes work again

Commit afd9709aff made us keep impl window
cairo surfaces around across changes of window scale. But the
window scale setter forgot to update the size and scale of the
surface. The effect of this was that toggling the window scale
from 1 to 2 in the inspector was not causing the window to draw
at twice the size, although the X window was made twice as big,
and input was scaled too. Fix this by updating the surface when
the window scale changes.
This commit is contained in:
Matthias Clasen
2014-11-03 22:35:11 -05:00
parent 824fa0314d
commit 113e1d1dc0

View File

@ -1899,6 +1899,11 @@ _gdk_x11_window_set_window_scale (GdkWindow *window,
impl = GDK_WINDOW_IMPL_X11 (window->impl);
impl->window_scale = scale;
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
if (impl->cairo_surface)
cairo_surface_set_device_scale (impl->cairo_surface, impl->window_scale, impl->window_scale);
#endif
_gdk_window_update_size (window);
toplevel = _gdk_x11_window_get_toplevel (window);
if (toplevel && window->window_type != GDK_WINDOW_FOREIGN)