[mate-settings-daemon] 01/01: debian/patches: Add 0000_xcursor_theme_and_size_to_xsettings.diff (LP:#1544814)
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Thu Mar 17 20:53:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
flexiondotorg-guest pushed a commit to branch master
in repository mate-settings-daemon.
commit f3b596fd31ee980cdb36a70e4555af40c727032c
Author: Martin Wimpress <code at flexion.org>
Date: Thu Mar 17 20:52:44 2016 +0000
debian/patches: Add 0000_xcursor_theme_and_size_to_xsettings.diff (LP:#1544814)
---
debian/changelog | 7 ++
.../0000_xcursor_theme_and_size_to_xsettings.diff | 129 +++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 137 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index bb8ec88..2d284c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mate-settings-daemon (1.12.1-2) UNRELEASED; urgency=medium
+
+ * debian/patches:
+ + Add 0000_xcursor_theme_and_size_to_xsettings.diff (LP:#1544814)
+
+ -- Martin Wimpress <code at flexion.org> Thu, 17 Mar 2016 17:35:02 +0000
+
mate-settings-daemon (1.12.1-1) unstable; urgency=medium
[ Martin Wimpress ]
diff --git a/debian/patches/0000_xcursor_theme_and_size_to_xsettings.diff b/debian/patches/0000_xcursor_theme_and_size_to_xsettings.diff
new file mode 100644
index 0000000..04865f6
--- /dev/null
+++ b/debian/patches/0000_xcursor_theme_and_size_to_xsettings.diff
@@ -0,0 +1,129 @@
+diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
+index 635040a..06b5399 100644
+--- a/plugins/xsettings/msd-xsettings-manager.c
++++ b/plugins/xsettings/msd-xsettings-manager.c
+@@ -50,6 +50,9 @@
+ #define INTERFACE_SCHEMA "org.mate.interface"
+ #define SOUND_SCHEMA "org.mate.sound"
+
++#define CURSOR_THEME_KEY "cursor-theme"
++#define CURSOR_SIZE_KEY "cursor-size"
++
+ #define FONT_RENDER_SCHEMA "org.mate.font-rendering"
+ #define FONT_ANTIALIASING_KEY "antialiasing"
+ #define FONT_HINTING_KEY "hinting"
+@@ -279,6 +282,8 @@ typedef struct
+ gboolean antialias;
+ gboolean hinting;
+ int dpi;
++ char *cursor_theme;
++ int cursor_size;
+ const char *rgba;
+ const char *hintstyle;
+ } MateXftSettings;
+@@ -289,23 +294,28 @@ static const char *rgba_types[] = { "rgb", "bgr", "vbgr", "vrgb" };
+ * This probably could be done a bit more cleanly with g_settings_get_enum
+ */
+ static void
+-xft_settings_get (GSettings *gsettings,
++xft_settings_get (MateXSettingsManager *manager,
+ MateXftSettings *settings)
+ {
+- char *antialiasing;
+- char *hinting;
+- char *rgba_order;
+- double dpi;
++ GSettings *mouse_gsettings;
++ char *antialiasing;
++ char *hinting;
++ char *rgba_order;
++ double dpi;
+
+- antialiasing = g_settings_get_string (gsettings, FONT_ANTIALIASING_KEY);
+- hinting = g_settings_get_string (gsettings, FONT_HINTING_KEY);
+- rgba_order = g_settings_get_string (gsettings, FONT_RGBA_ORDER_KEY);
+- dpi = get_dpi_from_gsettings_or_x_server (gsettings);
++ mouse_gsettings = g_hash_table_lookup (manager->priv->gsettings, MOUSE_SCHEMA);
++
++ antialiasing = g_settings_get_string (manager->priv->gsettings_font, FONT_ANTIALIASING_KEY);
++ hinting = g_settings_get_string (manager->priv->gsettings_font, FONT_HINTING_KEY);
++ rgba_order = g_settings_get_string (manager->priv->gsettings_font, FONT_RGBA_ORDER_KEY);
++ dpi = get_dpi_from_gsettings_or_x_server (manager->priv->gsettings_font);
+
+ settings->antialias = TRUE;
+ settings->hinting = TRUE;
+ settings->hintstyle = "hintfull";
+ 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->rgba = "rgb";
+
+ if (rgba_order) {
+@@ -385,6 +395,8 @@ xft_settings_set_xsettings (MateXSettingsManager *manager,
+ xsettings_manager_set_string (manager->priv->managers [i], "Xft/RGBA", settings->rgba);
+ xsettings_manager_set_string (manager->priv->managers [i], "Xft/lcdfilter",
+ g_str_equal (settings->rgba, "rgb") ? "lcddefault" : "none");
++ xsettings_manager_set_int (manager->priv->managers [i], "Gtk/CursorThemeSize", settings->cursor_size);
++ xsettings_manager_set_string (manager->priv->managers [i], "Gtk/CursorThemeName", settings->cursor_theme);
+ }
+ mate_settings_profile_end (NULL);
+ }
+@@ -448,6 +460,10 @@ xft_settings_set_xresources (MateXftSettings *settings)
+ settings->rgba);
+ update_property (add_string, "Xft.lcdfilter",
+ g_str_equal (settings->rgba, "rgb") ? "lcddefault" : "none");
++ update_property (add_string, "Xcursor.theme",
++ settings->cursor_theme);
++ update_property (add_string, "Xcursor.size",
++ g_ascii_dtostr (dpibuf, sizeof (dpibuf), (double) settings->cursor_size));
+
+ g_debug("xft_settings_set_xresources: new res '%s'", add_string->str);
+
+@@ -465,14 +481,13 @@ xft_settings_set_xresources (MateXftSettings *settings)
+ * X resources
+ */
+ static void
+-update_xft_settings (MateXSettingsManager *manager,
+- GSettings *gsettings)
++update_xft_settings (MateXSettingsManager *manager)
+ {
+ MateXftSettings settings;
+
+ mate_settings_profile_start (NULL);
+
+- xft_settings_get (gsettings, &settings);
++ xft_settings_get (manager, &settings);
+ xft_settings_set_xsettings (manager, &settings);
+ xft_settings_set_xresources (&settings);
+
+@@ -486,7 +501,7 @@ xft_callback (GSettings *gsettings,
+ {
+ int i;
+
+- update_xft_settings (manager, gsettings);
++ update_xft_settings (manager);
+
+ for (i = 0; manager->priv->managers [i]; i++) {
+ xsettings_manager_notify (manager->priv->managers [i]);
+@@ -580,6 +595,12 @@ xsettings_callback (GSettings *gsettings,
+ int i;
+ GVariant *value;
+
++ if (g_str_equal (key, CURSOR_THEME_KEY) ||
++ g_str_equal (key, CURSOR_SIZE_KEY)) {
++ xft_callback (NULL, key, manager);
++ return;
++ }
++
+ trans = find_translation_entry (gsettings, key);
+ if (trans == NULL) {
+ return;
+@@ -710,7 +731,7 @@ mate_xsettings_manager_start (MateXSettingsManager *manager,
+
+ manager->priv->gsettings_font = g_settings_new (FONT_RENDER_SCHEMA);
+ g_signal_connect (manager->priv->gsettings_font, "changed", G_CALLBACK (xft_callback), manager);
+- update_xft_settings (manager, manager->priv->gsettings_font);
++ update_xft_settings (manager);
+
+ start_fontconfig_monitor (manager);
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f40d4bd
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0000_xcursor_theme_and_size_to_xsettings.diff
--
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