[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/gnome-screensaver/devel gnome-screensaver-2.18.0-handle-overlapping-heads.patch, NONE, 1.1 gnome-screensaver.spec, 1.148, 1.149



Author: rstrode

Update of /cvs/pkgs/rpms/gnome-screensaver/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12484

Modified Files:
	gnome-screensaver.spec 
Added Files:
	gnome-screensaver-2.18.0-handle-overlapping-heads.patch 
Log Message:
- Try to workaround xrandr bug (bug 238961)


gnome-screensaver-2.18.0-handle-overlapping-heads.patch:

--- NEW FILE gnome-screensaver-2.18.0-handle-overlapping-heads.patch ---
--- gnome-screensaver-2.18.0/src/gs-manager.c.handle-overlapping-heads	2007-05-16 18:47:52.000000000 -0400
+++ gnome-screensaver-2.18.0/src/gs-manager.c	2007-05-16 19:23:45.000000000 -0400
@@ -1065,6 +1065,32 @@
         g_signal_emit (manager, signals [AUTH_REQUEST_END], 0);
 }
 
+int
+find_monitor_with_top_window_at_point (GdkScreen *screen,
+		                       gint       x,
+		                       gint       y)
+{
+	gint num_monitors, i;
+
+	g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
+
+	num_monitors = gdk_screen_get_n_monitors (screen);
+
+	for (i = num_monitors - 1; i <= 0; i--) {
+		GdkRectangle monitor;
+
+		gdk_screen_get_monitor_geometry (screen, i, &monitor);
+
+		if (x >= monitor.x &&
+				x < monitor.x + monitor.width &&
+				y >= monitor.y &&
+				y < (monitor.y + monitor.height))
+			return i;
+	}
+
+	return gdk_screen_get_monitor_at_point (screen, x, y);
+}
+
 static GSWindow *
 find_window_at_pointer (GSManager *manager)
 {
@@ -1078,7 +1104,7 @@
 
         display = gdk_display_get_default ();
         gdk_display_get_pointer (display, &screen, &x, &y, NULL);
-        monitor = gdk_screen_get_monitor_at_point (screen, x, y);
+        monitor = find_monitor_with_top_window_at_point (screen, x, y);
         screen_num = gdk_screen_get_number (screen);
 
         /* Find the gs-window that is on that screen */


Index: gnome-screensaver.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-screensaver/devel/gnome-screensaver.spec,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- gnome-screensaver.spec	11 May 2007 00:11:10 -0000	1.148
+++ gnome-screensaver.spec	16 May 2007 23:27:10 -0000	1.149
@@ -13,7 +13,7 @@
 Summary: GNOME Screensaver
 Name: gnome-screensaver
 Version: 2.18.0
-Release: 8%{?dist} 
+Release: 9%{?dist} 
 License: GPL
 Group: Amusements/Graphics
 Source0: http://ftp.gnome.org/pub/gnome/sources/gnome-screensaver/2.18/%{name}-%{version}.tar.bz2
@@ -29,6 +29,8 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=428199
 Patch6: gnome-screensaver-2.18.0-standard-flexi-server.patch
 
+Patch7: gnome-screensaver-2.18.0-handle-overlapping-heads.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 URL: http://www.gnome.org
 BuildRequires: gtk2-devel => %{gtk2_version}
@@ -74,6 +76,7 @@
 %patch4 -p1 -b .require-mouse-grab
 %patch5 -p1 -b .power-preferences
 %patch6 -p1 -b .standard-flexi-server
+%patch7 -p1 -b .handle-overlapping-screens
 
 %build
 autoreconf
@@ -130,6 +133,9 @@
 %{_sysconfdir}/pam.d/*
 
 %changelog
+* Wed May 16 2007 Ray Strode <rstrode redhat com> - 2.18.0-9
+- Try to workaround xrandr bug (bug 238961)
+
 * Thu May 10 2007 Matthias Clasen <mclasen redhat com> - 2.18.0-8
 - Drop the explicit file requires on the themed lock 
   dialog, as it is provided by system-logos anyway


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]