[mate-settings-daemon] 01/01: debian/patches: Update 0000_hidpi.patch. Fix where DPI is getting scaled and remove ceil for scaled DPI.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Fri Jan 26 00:13:07 UTC 2018


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch ubuntu/bionic
in repository mate-settings-daemon.

commit d2b4d86c06949d534cd920bf74a9fed3ebe97d2e
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date:   Thu Jan 25 23:16:53 2018 +0000

    debian/patches: Update 0000_hidpi.patch. Fix where DPI is getting scaled and remove ceil for scaled DPI.
---
 debian/patches/0000_hidpi.patch | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/debian/patches/0000_hidpi.patch b/debian/patches/0000_hidpi.patch
index 98349de..d3999c3 100644
--- a/debian/patches/0000_hidpi.patch
+++ b/debian/patches/0000_hidpi.patch
@@ -29,10 +29,30 @@ index 165d5b0..185b8c9 100644
                  /* Huh!?  No screen? */
                  dpi = DPI_DEFAULT;
 diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
-index a9635a8..ef14c78 100644
+index a9635a8..a84fb82 100644
 --- a/plugins/xsettings/msd-xsettings-manager.c
 +++ b/plugins/xsettings/msd-xsettings-manager.c
-@@ -302,24 +302,28 @@ xft_settings_get (MateXSettingsManager *manager,
+@@ -233,6 +233,7 @@ get_dpi_from_x_server (void)
+ {
+         GdkScreen *screen;
+         double     dpi;
++        gint       scale;
+ 
+         screen = gdk_screen_get_default ();
+         if (screen != NULL) {
+@@ -255,6 +256,11 @@ get_dpi_from_x_server (void)
+                 dpi = DPI_FALLBACK;
+         }
+ 
++
++        scale = gdk_window_get_scale_factor (gdk_screen_get_root_window (screen));
++        if (scale)
++                dpi = dpi * scale;
++
+         return dpi;
+ }
+ 
+@@ -302,24 +308,28 @@ xft_settings_get (MateXSettingsManager *manager,
                    MateXftSettings *settings)
  {
          GSettings *mouse_gsettings;
@@ -41,7 +61,7 @@ index a9635a8..ef14c78 100644
          char      *hinting;
          char      *rgba_order;
          double     dpi;
-+        int        scale;
++        gint       scale;
  
          mouse_gsettings = g_hash_table_lookup (manager->priv->gsettings, MOUSE_SCHEMA);
 +        screen = gdk_screen_get_default();
@@ -55,8 +75,7 @@ index a9635a8..ef14c78 100644
          settings->antialias = TRUE;
          settings->hinting = TRUE;
          settings->hintstyle = "hintslight";
--        settings->dpi = dpi * 1024; /* Xft wants 1/1024ths of an inch */
-+        settings->dpi = dpi * scale * 1024; /* Xft wants 1/1024ths of an inch */
+         settings->dpi = dpi * 1024; /* Xft wants 1/1024ths of an inch */
          settings->cursor_theme = g_settings_get_string (mouse_gsettings, CURSOR_THEME_KEY);
 -        settings->cursor_size = g_settings_get_int (mouse_gsettings, CURSOR_SIZE_KEY);
 +        settings->cursor_size = scale * g_settings_get_int (mouse_gsettings, CURSOR_SIZE_KEY);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-settings-daemon.git



More information about the pkg-mate-commits mailing list