mousetweaks r279 - in trunk: . src
- From: gerdk svn gnome org
- To: svn-commits-list gnome org
- Subject: mousetweaks r279 - in trunk: . src
- Date: Sun, 7 Sep 2008 17:36:26 +0000 (UTC)
Author: gerdk
Date: Sun Sep 7 17:36:26 2008
New Revision: 279
URL: http://svn.gnome.org/viewvc/mousetweaks?rev=279&view=rev
Log:
2008-09-07 Gerd Kohlberger <gerdk svn gnome org>
* src/mt-main.c: (mt_main_generate_button_event): Fix typo that
caused double clicks not to work.
(mt_main_do_dwell_click)(dwell_timer_finished): Improve drag click
handling. (mt_main_generate_motion_event): Add error trap
Modified:
trunk/ChangeLog
trunk/src/mt-main.c
Modified: trunk/src/mt-main.c
==============================================================================
--- trunk/src/mt-main.c (original)
+++ trunk/src/mt-main.c Sun Sep 7 17:36:26 2008
@@ -65,9 +65,10 @@
static void
mt_main_generate_motion_event (GdkScreen *screen, gint x, gint y)
{
- gdk_display_warp_pointer (gdk_display_get_default (),
- screen, x, y);
+ gdk_error_trap_push ();
+ gdk_display_warp_pointer (gdk_display_get_default (), screen, x, y);
gdk_flush ();
+ gdk_error_trap_pop ();
}
static void
@@ -76,6 +77,7 @@
gboolean type,
gulong delay)
{
+ gdk_error_trap_push ();
switch (type) {
case PRESS:
XTestFakeButtonEvent (mt->xtst_display,
@@ -95,17 +97,18 @@
XTestFakeButtonEvent (mt->xtst_display,
button, True, CurrentTime);
XTestFakeButtonEvent (mt->xtst_display,
- button, True, delay);
+ button, False, delay);
XTestFakeButtonEvent (mt->xtst_display,
button, True, CurrentTime);
XTestFakeButtonEvent (mt->xtst_display,
- button, True, delay);
+ button, False, delay);
break;
default:
g_warning ("Unknown sequence.");
break;
}
XFlush (mt->xtst_display);
+ gdk_error_trap_pop ();
}
static void
@@ -139,7 +142,7 @@
clicktype = mt_service_get_clicktype (mt->service);
- if (mt->dwell_mode == DWELL_MODE_GESTURE)
+ if (mt->dwell_mode == DWELL_MODE_GESTURE && !mt->dwell_drag_started)
mt_main_generate_motion_event (mt_main_current_screen (mt),
mt->pointer_x, mt->pointer_y);
@@ -313,6 +316,10 @@
if (mt_main_analyze_gesture (mt))
mt_main_do_dwell_click (mt);
}
+ /* if a drag action is in progress stop it */
+ else if (mt->dwell_drag_started) {
+ mt_main_do_dwell_click (mt);
+ }
else
dwell_start_gesture (mt);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]