[gnome-settings-daemon] xsettings: Use primary monitor for scaling factor
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xsettings: Use primary monitor for scaling factor
- Date: Fri, 14 Mar 2014 14:37:07 +0000 (UTC)
commit 533783712bf936ba08434dc40f73209e262dba67
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 20 12:38:47 2013 +0100
xsettings: Use primary monitor for scaling factor
Not screen 0.
https://bugzilla.gnome.org/show_bug.cgi?id=709859
plugins/xsettings/gsd-xsettings-manager.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index f5b1322..88a24a3 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -442,12 +442,15 @@ get_window_scale (GnomeXSettingsManager *manager)
window_scale =
g_settings_get_uint (interface_settings, SCALING_FACTOR_KEY);
if (window_scale == 0) {
+ int primary;
+
display = gdk_display_get_default ();
screen = gdk_display_get_default_screen (display);
- gdk_screen_get_monitor_geometry (screen, 0, &rect);
- width_mm = gdk_screen_get_monitor_width_mm (screen, 0);
- height_mm = gdk_screen_get_monitor_height_mm (screen, 0);
- monitor_scale = gdk_screen_get_monitor_scale_factor (screen, 0);
+ primary = gdk_screen_get_primary_monitor (screen);
+ gdk_screen_get_monitor_geometry (screen, primary, &rect);
+ width_mm = gdk_screen_get_monitor_width_mm (screen, primary);
+ height_mm = gdk_screen_get_monitor_height_mm (screen, primary);
+ monitor_scale = gdk_screen_get_monitor_scale_factor (screen, primary);
window_scale = 1;
if (width_mm > 0 && height_mm > 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]