[gnome-shell/gnome-3-10] layout: Don't query the monitor size twice



commit 03b46a551055cbffce12b89d6c2a58825fbfa15f
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Mon Feb 17 13:42:20 2014 +0100

    layout: Don't query the monitor size twice

 js/ui/layout.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index c68ba9d..59dcc03 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -495,8 +495,8 @@ const LayoutManager = new Lang.Class({
             St.ThemeContext.get_for_stage(global.stage).scale_factor = 1;
             return;
         }
-        let dpi_x = primary.width / (global.gdk_screen.get_monitor_width_mm(this.primaryIndex) / 25.4);
-        let dpi_y = primary.height / (global.gdk_screen.get_monitor_height_mm(this.primaryIndex) / 25.4);
+        let dpi_x = primary.width / (width_mm / 25.4);
+        let dpi_y = primary.height / (height_mm / 25.4);
         if (dpi_x > HIGH_DPI_LIMIT && dpi_y > HIGH_DPI_LIMIT)
             St.ThemeContext.get_for_stage(global.stage).scale_factor = 2;
         else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]