[mate-control-center] 01/01: debian/patches: Add 0003_scale_cursor_when_changing_themes.patch. Scale cursor size for HiDPI displays when changing themes.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Sat Mar 24 20:21: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 mate-control-center.
commit 6e2ccc2aa1c213d0ff9ecb607f1c83d628435357
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Sat Mar 24 20:20:51 2018 +0000
debian/patches: Add 0003_scale_cursor_when_changing_themes.patch. Scale cursor size for HiDPI displays when changing themes.
---
.../0003_scale_cursor_when_changing_themes.patch | 32 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 33 insertions(+)
diff --git a/debian/patches/0003_scale_cursor_when_changing_themes.patch b/debian/patches/0003_scale_cursor_when_changing_themes.patch
new file mode 100644
index 0000000..d9c4f2b
--- /dev/null
+++ b/debian/patches/0003_scale_cursor_when_changing_themes.patch
@@ -0,0 +1,32 @@
+Author: Victor Kareh <vkareh at vkareh.net>
+Description: Scale cursor size for HiDPI when changing themes
+
+diff --git a/capplets/common/mate-theme-info.c b/capplets/common/mate-theme-info.c
+index 678e11f..3012c9b 100644
+--- a/capplets/common/mate-theme-info.c
++++ b/capplets/common/mate-theme-info.c
+@@ -32,6 +32,7 @@
+ #include <glib/gi18n.h>
+ #include <gmodule.h>
+ #include <gtk/gtk.h>
++#include <gdk/gdk.h>
+ #include <gdk/gdkx.h>
+ #include <gio/gio.h>
+ #include <string.h>
+@@ -383,6 +384,8 @@ MateThemeMetaInfo* mate_theme_read_meta_theme(GFile* meta_theme_uri)
+
+ str = mate_desktop_item_get_string(meta_theme_ditem, CURSOR_THEME_KEY);
+
++ GdkWindow *window = gdk_get_default_root_window ();
++ gint scale = gdk_window_get_scale_factor (window);
+ if (str != NULL)
+ {
+ meta_theme_info->cursor_theme_name = g_strdup(str);
+@@ -399,6 +402,7 @@ MateThemeMetaInfo* mate_theme_read_meta_theme(GFile* meta_theme_uri)
+ meta_theme_info->cursor_theme_name = g_strdup("default");
+ meta_theme_info->cursor_size = 18;
+ }
++ meta_theme_info->cursor_size *= scale;
+
+ str = mate_desktop_item_get_string(meta_theme_ditem, APPLICATION_FONT_KEY);
+
diff --git a/debian/patches/series b/debian/patches/series
index d7c348d..4aa0a32 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
0000_hidpi.patch
0001_fix_screen_geometry_when_snapping.patch
0002_add_auto-detect_toggle.patch
+0003_scale_cursor_when_changing_themes.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