[Pkg-sugar-commit] [sugar-toolkit-gtk3] 01/07: Add patch cherry-picked upstream to fix screen resize race.

Jonas Smedegaard dr at jones.dk
Wed Jan 25 03:52:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master-0.110
in repository sugar-toolkit-gtk3.

commit caf2aa67a91c2e7edabe7d3f91f45f5af2b780c8
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Wed Jan 25 04:18:22 2017 +0100

    Add patch cherry-picked upstream to fix screen resize race.
---
 debian/patches/020161109~a6e62a5.patch | 36 ++++++++++++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 2 files changed, 37 insertions(+)

diff --git a/debian/patches/020161109~a6e62a5.patch b/debian/patches/020161109~a6e62a5.patch
new file mode 100644
index 0000000..2777385
--- /dev/null
+++ b/debian/patches/020161109~a6e62a5.patch
@@ -0,0 +1,36 @@
+Description: Fix screen resize race
+ When an external monitor is connected or disconnected, about 25% of the
+ time an activity does not resize correctly; a size-changed signal
+ occurs but the workarea geometry has not changed.
+ .
+ Underlying problem is an update race in get_monitor_workarea, so the
+ fix is to call get_monitor_geometry for obtaining the width and height.
+ .
+ Can be reproduced easily without an external monitor by switching
+ display panel resolution repeatedly;
+ .
+  xrandr --output eDP1 --mode 1024x768
+  xrandr --output eDP1 --mode 1366x768
+Author: James Cameron <quozl at laptop.org>
+Origin: Upstream, https://github.com/sugarlabs/sugar-toolkit-gtk3/commit/a6e62a5
+Bug: https://bugs.sugarlabs.org/ticket/4968
+Last-Update: 2017-01-25
+
+--- a/src/sugar3/activity/activity.py
++++ b/src/sugar3/activity/activity.py
+@@ -621,12 +621,12 @@
+ 
+     def _adapt_window_to_screen(self):
+         screen = Gdk.Screen.get_default()
+-        workarea = screen.get_monitor_workarea(screen.get_number())
++        rect = screen.get_monitor_geometry(screen.get_number())
+         geometry = Gdk.Geometry()
+         geometry.max_width = geometry.base_width = geometry.min_width = \
+-            workarea.width
++            rect.width
+         geometry.max_height = geometry.base_height = geometry.min_height = \
+-            workarea.height
++            rect.height
+         geometry.width_inc = geometry.height_inc = geometry.min_aspect = \
+             geometry.max_aspect = 1
+         hints = Gdk.WindowHints(Gdk.WindowHints.ASPECT |
diff --git a/debian/patches/series b/debian/patches/series
index a4663fb..53c88d7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+020161109~a6e62a5.patch
 020161109~ee93ad3.patch
 2002_ignore_debian_and_quilt-patches.patch
 #2003_bundlebuilder_exit_nonzero_on_error.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit-gtk3.git



More information about the pkg-sugar-commit mailing list