[Xfce4-commits] [apps/xfce4-screensaver] 297/425: Bug fix: screensaver and lock screen not correctly displayed in configurations with overlapping monitor geometries

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:52:24 CEST 2018


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

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit fd66fc47779b7f14c9b46682607c24af6ed075d4
Author: fuzaburo <fuzaburo at users.noreply.github.com>
Date:   Sat Apr 15 00:27:14 2017 +0900

    Bug fix: screensaver and lock screen not correctly displayed in configurations with overlapping monitor geometries
---
 src/gs-window-x11.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index df22ede..dbdb469 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -305,6 +305,7 @@ get_outside_region (GSWindow *window)
 	GdkDisplay *display;
 #if GTK_CHECK_VERSION (3, 22, 0)
 	int         i;
+	int         num_monitors;
 #else
 	GdkScreen  *screen;
 	int         mon;
@@ -319,16 +320,18 @@ get_outside_region (GSWindow *window)
 	region = cairo_region_create ();
 
 #if GTK_CHECK_VERSION (3, 22, 0)
-	for (i = 0; i < gdk_display_get_n_monitors (display); i++)
+	num_monitors = gdk_display_get_n_monitors (display);
+	for (i = 0; i < num_monitors; i++)
 #else
-	for (mon = 0; mon < gdk_screen_get_n_monitors (screen); mon++)
+	for (mon = 0; mon < window->priv->monitor; mon++)
 #endif
 	{
 #if GTK_CHECK_VERSION (3, 22, 0)
 		GdkMonitor *mon = gdk_display_get_monitor (display, i);
-#endif
+
 		if (mon != window->priv->monitor)
 		{
+#endif
 			GdkRectangle geometry;
 			cairo_rectangle_int_t rectangle;
 
@@ -343,7 +346,13 @@ get_outside_region (GSWindow *window)
 			rectangle.width = geometry.width;
 			rectangle.height = geometry.height;
 			cairo_region_union_rectangle (region, &rectangle);
+#if GTK_CHECK_VERSION (3, 22, 0)
 		}
+		else
+		{
+			break;
+		}
+#endif
 	}
 
 	return region;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list