GDK W32: Init display scale to the global Windows scale, not 1

This affects gdk_device_query_state() for the virtual device. It has
no window, and is forced to query the display itself, and display
defaults its scale to 1 even for HiDPI desktops. Use the same
"query scale of a NULL monitor" trick that we use in other places
to get the global desktop scale.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
This commit is contained in:
Руслан Ижбулатов 2018-03-24 10:05:34 +00:00
parent 6bdb004dfd
commit 6b50788901

View File

@ -972,7 +972,7 @@ gdk_win32_display_init (GdkWin32Display *display)
display->has_fixed_scale = TRUE;
}
else
display->surface_scale = 1;
display->surface_scale = _gdk_win32_display_get_monitor_scale_factor (display, NULL, NULL, NULL);
_gdk_win32_display_init_cursors (display);
gdk_win32_display_check_composited (display);