r49420 - in /desktop/unstable/nautilus/debian: changelog patches/0001-desktop-canvas-view-scale-desktop-workarea.patch patches/series

jbicha-guest at users.alioth.debian.org jbicha-guest at users.alioth.debian.org
Sat Aug 6 02:53:57 UTC 2016


Author: jbicha-guest
Date: Sat Aug  6 02:53:57 2016
New Revision: 49420

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=49420
Log:
Add git patch to fix desktop margins with high-dpi scaling

Added:
    desktop/unstable/nautilus/debian/patches/0001-desktop-canvas-view-scale-desktop-workarea.patch
Modified:
    desktop/unstable/nautilus/debian/changelog
    desktop/unstable/nautilus/debian/patches/series

Modified: desktop/unstable/nautilus/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/nautilus/debian/changelog?rev=49420&op=diff
==============================================================================
--- desktop/unstable/nautilus/debian/changelog	[utf-8] (original)
+++ desktop/unstable/nautilus/debian/changelog	[utf-8] Sat Aug  6 02:53:57 2016
@@ -2,6 +2,8 @@
 
   * New upstream release
   * Drop format patch, applied in new version
+  * 0001-desktop-canvas-view-scale-desktop-workarea.patch:
+    - Add git patch to fix desktop margins with high-dpi scaling
   * Convert from cdbs to dh
   * Add debian/docs to explicitly install AUTHORS, NEWS, and THANKS
   * Partially multiarchify but still install nautilus extensions to

Added: desktop/unstable/nautilus/debian/patches/0001-desktop-canvas-view-scale-desktop-workarea.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/nautilus/debian/patches/0001-desktop-canvas-view-scale-desktop-workarea.patch?rev=49420&op=file
==============================================================================
--- desktop/unstable/nautilus/debian/patches/0001-desktop-canvas-view-scale-desktop-workarea.patch	(added)
+++ desktop/unstable/nautilus/debian/patches/0001-desktop-canvas-view-scale-desktop-workarea.patch	[utf-8] Sat Aug  6 02:53:57 2016
@@ -0,0 +1,49 @@
+From a29a09d6d823363c3124f86937c1f0f3c8ffd107 Mon Sep 17 00:00:00 2001
+From: Andrea Azzarone <azzaronea at gmail.com>
+Date: Sat, 30 Jul 2016 17:33:40 +0200
+Subject: desktop-canvas-view: scale desktop workarea
+
+The problem is that in the function canvas_container_set_workarea the screen width
+and height are in "application pixels" while the workarea ones are in "device
+pixels" so when the scaling is > 1, the margins are not properly setted.
+
+We need to scale-down the workarea geometries to "application pixels".
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=769302
+Bug-Ubuntu: https://launchpad.net/bugs/1564375
+---
+ src/nautilus-desktop-canvas-view.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/nautilus-desktop-canvas-view.c b/src/nautilus-desktop-canvas-view.c
+index 361d205..bf2c534 100644
+--- a/src/nautilus-desktop-canvas-view.c
++++ b/src/nautilus-desktop-canvas-view.c
+@@ -85,6 +85,7 @@ canvas_container_set_workarea (NautilusCanvasContainer *canvas_container,
+ {
+ 	int left, right, top, bottom;
+ 	int screen_width, screen_height;
++	int scale;
+ 	int i;
+ 
+ 	left = right = top = bottom = 0;
+@@ -92,11 +93,14 @@ canvas_container_set_workarea (NautilusCanvasContainer *canvas_container,
+ 	screen_width  = gdk_screen_get_width (screen);
+ 	screen_height = gdk_screen_get_height (screen);
+ 
++	scale = gdk_window_get_scale_factor (gdk_screen_get_root_window (screen));
++	scale = scale ? scale : 1;
++
+ 	for (i = 0; i < n_items; i += 4) {
+-		int x      = workareas [i];
+-		int y      = workareas [i + 1];
+-		int width  = workareas [i + 2];
+-		int height = workareas [i + 3];
++		int x      = workareas [i] / scale;
++		int y      = workareas [i + 1] / scale;
++		int width  = workareas [i + 2] / scale;
++		int height = workareas [i + 3] / scale;
+ 
+ 		if ((x + width) > screen_width || (y + height) > screen_height)
+ 			continue;
+

Modified: desktop/unstable/nautilus/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/nautilus/debian/patches/series?rev=49420&op=diff
==============================================================================
--- desktop/unstable/nautilus/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/nautilus/debian/patches/series	[utf-8] Sat Aug  6 02:53:57 2016
@@ -0,0 +1 @@
+0001-desktop-canvas-view-scale-desktop-workarea.patch




More information about the pkg-gnome-commits mailing list