Handle resolution changes in the GDK backend code
gdk_x11_display_set_window_scale() affects the interpretation of the Xft/DPI XSETTING - it is substituted inside GDK with the value of Gdk/UnscaledDPI xsetting. However, this change is not propagated to GTK+ and from GTK+ back to gdk_screen_set_resolution() until the main loop is run. Fix this by handling the screen resolution directly in gdk/x11. This requires duplication of code between GDK and GTK+ since we still have to handle DPI in GTK+ in the case that GdkSettings:gtk-xft-dpi is set by the application. https://bugzilla.gnome.org/show_bug.cgi?id=733076
This commit is contained in:
committed by
Matthias Clasen
parent
cef6f34fb7
commit
fc6e2cc4b2
@ -75,8 +75,8 @@ gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
|
||||
NSScreen *nsscreen;
|
||||
|
||||
nsscreen = [[NSScreen screens] objectAtIndex:0];
|
||||
gdk_screen_set_resolution (screen,
|
||||
72.0 * [nsscreen userSpaceScaleFactor]);
|
||||
_gdk_screen_set_resolution (screen,
|
||||
72.0 * [nsscreen userSpaceScaleFactor]);
|
||||
|
||||
gdk_quartz_screen_calculate_layout (quartz_screen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user