[mate-control-center] 04/05: debian/patches: Add 0000_hidpi.patch. HiDPI support.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Tue Jan 23 16:34:41 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-control-center.
commit 21170833f7a72d54600a20ace7440577fb39db1c
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Tue Jan 23 11:17:35 2018 +0000
debian/patches: Add 0000_hidpi.patch. HiDPI support.
---
debian/patches/0000_hidpi.patch | 23 +++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 24 insertions(+)
diff --git a/debian/patches/0000_hidpi.patch b/debian/patches/0000_hidpi.patch
new file mode 100644
index 0000000..61cca9c
--- /dev/null
+++ b/debian/patches/0000_hidpi.patch
@@ -0,0 +1,23 @@
+diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c
+index 0df8d4e..ee8544b 100644
+--- a/capplets/appearance/appearance-font.c
++++ b/capplets/appearance/appearance-font.c
+@@ -422,6 +422,7 @@ get_dpi_from_x_server (void)
+ {
+ GdkScreen *screen;
+ double dpi;
++ gint scale;
+
+ screen = gdk_screen_get_default ();
+
+@@ -443,6 +444,10 @@ get_dpi_from_x_server (void)
+ dpi = DPI_FALLBACK;
+ }
+
++ scale = gdk_window_get_scale_factor(gdk_screen_get_root_window (screen));
++ if (scale)
++ dpi = ceil(dpi * scale);
++
+ return dpi;
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8f7d3a1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0000_hidpi.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-control-center.git
More information about the pkg-mate-commits
mailing list