[marco] 01/01: debian/patches: Add 0002_scale_cursor_size.patch. Scale cursor size on HiDPI displays.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Sat Mar 24 20:19:03 UTC 2018
This is an automated email from the git hooks/post-receive script.
flexiondotorg-guest pushed a commit to branch master
in repository marco.
commit 9f09b078999718d6083595c310e3c273915d113d
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Sat Mar 24 20:18:50 2018 +0000
debian/patches: Add 0002_scale_cursor_size.patch. Scale cursor size on HiDPI displays.
---
debian/patches/0002_scale_cursor_size.patch | 27 +++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 28 insertions(+)
diff --git a/debian/patches/0002_scale_cursor_size.patch b/debian/patches/0002_scale_cursor_size.patch
new file mode 100644
index 0000000..cef04cb
--- /dev/null
+++ b/debian/patches/0002_scale_cursor_size.patch
@@ -0,0 +1,27 @@
+Author: Victor Kareh <vkareh at vkareh.net>
+Description: Scale cursor size for HiDPI
+
+diff --git a/src/core/prefs.c b/src/core/prefs.c
+index 021ad87..e376089 100644
+--- a/src/core/prefs.c
++++ b/src/core/prefs.c
+@@ -27,6 +27,7 @@
+ #include "prefs.h"
+ #include "ui.h"
+ #include "util.h"
++#include <gdk/gdk.h>
+ #include <gio/gio.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -1097,7 +1098,10 @@ meta_prefs_get_cursor_theme (void)
+ int
+ meta_prefs_get_cursor_size (void)
+ {
+- return cursor_size;
++ GdkWindow *window = gdk_get_default_root_window ();
++ gint scale = gdk_window_get_scale_factor (window);
++
++ return cursor_size * scale;
+ }
+
+ gboolean
diff --git a/debian/patches/series b/debian/patches/series
index 80373bb..d31f65f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001_hidpi_window_decorations.patch
+0002_scale_cursor_size.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/marco.git
More information about the pkg-mate-commits
mailing list