diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2018-03-24 10:05:34 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2018-03-24 10:09:54 +0000 |
commit | 6b50788901a6053e588c7f41ef358b768eca8222 (patch) | |
tree | 35421875b54368a7df7527a43e1b5770f5e7ad43 /gdk | |
parent | 6bdb004dfdacaa4e26dc0111a4fcf13dce11b690 (diff) | |
download | gtk+-6b50788901a6053e588c7f41ef358b768eca8222.tar.gz |
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
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/win32/gdkdisplay-win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index c0358ab119..821124ee3f 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -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); |