[mate-settings-daemon] 01/02: debian/patches: Add 0001_hidpi_background_support.patch. Support background fallback on HiDPI.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Wed Apr 11 00:10:56 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-settings-daemon.

commit 81cc6660e510e9fa027b8db04a3dba33b3df7541
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date:   Tue Apr 10 18:58:50 2018 +0100

    debian/patches: Add 0001_hidpi_background_support.patch. Support background fallback on HiDPI.
---
 debian/patches/0001_hidpi_background_support.patch | 45 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 46 insertions(+)

diff --git a/debian/patches/0001_hidpi_background_support.patch b/debian/patches/0001_hidpi_background_support.patch
new file mode 100644
index 0000000..0fe8ec0
--- /dev/null
+++ b/debian/patches/0001_hidpi_background_support.patch
@@ -0,0 +1,45 @@
+diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c
+index b4eaca6..724e01e 100644
+--- a/plugins/background/msd-background-manager.c
++++ b/plugins/background/msd-background-manager.c
+@@ -185,11 +185,12 @@ real_draw_bg (MsdBackgroundManager *manager,
+ {
+ 	MsdBackgroundManagerPrivate *p = manager->priv;
+ 	GdkWindow *window = gdk_screen_get_root_window (screen);
+-	gint width   = WidthOfScreen (gdk_x11_screen_get_xscreen (screen));
+-	gint height  = HeightOfScreen (gdk_x11_screen_get_xscreen (screen));
++	gint scale   = gdk_window_get_scale_factor (window);
++	gint width   = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
++	gint height  = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
+ 
+ 	free_bg_surface (manager);
+-	p->surface = mate_bg_create_surface (p->bg, window, width, height, TRUE);
++	p->surface = mate_bg_create_surface_scale (p->bg, window, width, height, scale, TRUE);
+ 
+ 	if (p->do_fade)
+ 	{
+@@ -255,10 +256,12 @@ on_screen_size_changed (GdkScreen            *screen,
+ 	if (!p->msd_can_draw || p->draw_in_progress || caja_is_drawing_bg (manager))
+ 		return;
+ 
++	GdkWindow *window = gdk_screen_get_root_window (screen);
++	gint scale = gdk_window_get_scale_factor (window);
+ 	gint scr_num = gdk_x11_screen_get_screen_number (screen);
+ 	gchar *old_size = g_list_nth_data (manager->priv->scr_sizes, scr_num);
+-	gchar *new_size = g_strdup_printf ("%dx%d", WidthOfScreen (gdk_x11_screen_get_xscreen (screen)),
+-						    HeightOfScreen (gdk_x11_screen_get_xscreen (screen)));
++	gchar *new_size = g_strdup_printf ("%dx%d", WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale,
++						    HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale);
+ 	if (g_strcmp0 (old_size, new_size) != 0)
+ 	{
+ 		g_debug ("Screen%d size changed: %s -> %s", scr_num, old_size, new_size);
+@@ -297,8 +300,7 @@ settings_change_event_idle_cb (MsdBackgroundManager *manager)
+ {
+ 	mate_settings_profile_start ("settings_change_event_idle_cb");
+ 
+-	mate_bg_load_from_gsettings (manager->priv->bg,
+-				     manager->priv->settings);
++	mate_bg_load_from_preferences (manager->priv->bg);
+ 
+ 	mate_settings_profile_end ("settings_change_event_idle_cb");
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5c46b60
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_hidpi_background_support.patch

-- 
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