rpms/gdm/devel gdm-2.19.5-dont-warp-pointer-to-stylus.patch, NONE, 1.1 gdm.spec, 1.264, 1.265

Ray Strode (rstrode) fedora-extras-commits at redhat.com
Mon Aug 6 15:15:10 UTC 2007


Author: rstrode

Update of /cvs/pkgs/rpms/gdm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26378

Modified Files:
	gdm.spec 
Added Files:
	gdm-2.19.5-dont-warp-pointer-to-stylus.patch 
Log Message:
- turn off dwellmouselistener if devices don't send core events.
  don't warp pointer to stylus ever (upstream bug 457998)


gdm-2.19.5-dont-warp-pointer-to-stylus.patch:

--- NEW FILE gdm-2.19.5-dont-warp-pointer-to-stylus.patch ---
diff -up gdm-2.19.5/gui/modules/dwellmouselistener.c.dont-warp-pointer-to-stylus gdm-2.19.5/gui/modules/dwellmouselistener.c
--- gdm-2.19.5/gui/modules/dwellmouselistener.c.dont-warp-pointer-to-stylus	2007-08-06 11:08:06.000000000 -0400
+++ gdm-2.19.5/gui/modules/dwellmouselistener.c	2007-08-06 11:09:10.000000000 -0400
@@ -97,7 +97,6 @@ static int cross_pos = 0;
 static guint max_crossings = 0;
 static XID *ext_input_devices = NULL;
 static gint ext_device_count = 0;
-static gboolean latch_core_pointer = TRUE;
  
 static void create_event_watcher (void);
 static void load_bindings(gchar *path);
@@ -142,8 +141,21 @@ init_xinput (GdkDisplay *display, GdkWin
 
 	for (i=0; i < num_devices; i++) {
 		if (devices[i].use == IsXExtensionDevice) {
+
+			XDeviceCoreState *core_state;
+			gboolean sends_core_events = FALSE;
+
 			device = XOpenDevice (GDK_DISPLAY_XDISPLAY (display),
 				devices[i].id);
+
+			core_state = (XDeviceCoreState *)
+				XGetDeviceControl (GDK_DISPLAY_XDISPLAY (display),
+						   device, DEVICE_CORE);
+			if (core_state->length == sizeof (XDeviceCoreState))
+				sends_core_events = core_state->iscore != False; 
+			XFreeDeviceControl ((XDeviceControl *) core_state);
+
+			if (sends_core_events)
 			for (j=0; j < device->num_classes && number < 39; j++) {
 				switch (device->classes[j].input_class) 
 				{
@@ -687,9 +699,6 @@ leave_enter_emission_hook (GSignalInvoca
 					cursor);
 				gdk_cursor_unref (cursor);
 				g_timeout_add (2000, change_cursor_back, NULL);
-				latch_core_pointer = FALSE;
-				/* once we've recognized a gesture, we need to *
-				 * leave the pointer alone */
 				
 				at_name = strstr (action, "#AT_TYPE=");
 				if (at_name != NULL) {
@@ -719,25 +728,6 @@ leave_enter_emission_hook (GSignalInvoca
 	return TRUE;
 }
 
-static GdkFilterReturn
-gestures_filter (GdkXEvent *gdk_xevent,
-		 GdkEvent *event,
-		 gpointer data)
-{
-	XEvent *xevent = (XEvent *)gdk_xevent;
-
-	if (xevent->type == xinput_type_motion) {
-		XDeviceMotionEvent *motion = (XDeviceMotionEvent *) xevent;
-		if ((motion->axes_count < 2) || !is_ext_device (motion->deviceid))
-			return GDK_FILTER_CONTINUE;
-		if (latch_core_pointer)
-		    XWarpPointer (motion->display, None, 
-			      motion->root,
-			      0, 0, 0, 0, motion->axis_data[0], motion->axis_data[1]);
-	}
-       	return GDK_FILTER_CONTINUE;
-}
-
 static void
 create_event_watcher (void)
 {
@@ -762,8 +752,6 @@ create_event_watcher (void)
 		gdk_screen_get_root_window (
 		gdk_display_get_default_screen (display)));
 
-	gdk_window_add_filter (NULL, gestures_filter, NULL);
-
 	/* set up emission hook */
 	gtk_type_class (GTK_TYPE_WIDGET);
 	enter_signal_id = g_signal_lookup ("enter-notify-event", GTK_TYPE_WIDGET);


Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/devel/gdm.spec,v
retrieving revision 1.264
retrieving revision 1.265
diff -u -r1.264 -r1.265
--- gdm.spec	3 Aug 2007 16:41:14 -0000	1.264
+++ gdm.spec	6 Aug 2007 15:14:38 -0000	1.265
@@ -17,7 +17,7 @@
 Summary: The GNOME Display Manager
 Name: gdm
 Version: 2.19.5
-Release: 3%{?dist}
+Release: 4%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: User Interface/X
@@ -50,6 +50,9 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=411501
 Patch33: gdm-2.19.1-pass-ats-to-session.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=457998
+Patch34: gdm-2.19.5-dont-warp-pointer-to-stylus.patch
+
 Patch100: gdm-2.19.4-change-defaults.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -131,6 +134,7 @@
 %patch29 -p0 -b .greeter
 %patch32 -p1 -b .a11y-fixes
 %patch33 -p1 -b .pass-ats-to-session
+%patch34 -p1 -b .dont-warp-pointer-to-stylus
 
 %patch100 -p1 -b .change-defaults
 
@@ -348,6 +352,10 @@
 %{_datadir}/pixmaps/faces/extras/*.jpg
 
 %changelog
+* Mon Aug  6 2007 Ray Strode <rstrode at redhat.com> - 1:2.19.5-4
+- turn off dwellmouselistener if devices don't send core events.
+  don't warp pointer to stylus ever (upstream bug 457998)
+
 * Fri Aug  3 2007 Ray Strode <rstrode at redhat.com> - 1:2.19.5-3
 - remove dwellmouselistener module from default configuration.
   It's pretty broken (bug 248752)




More information about the fedora-extras-commits mailing list