79 lines
2.7 KiB
Diff
79 lines
2.7 KiB
Diff
|
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);
|