mousetweaks r206 - in trunk: . src
- From: gerdk svn gnome org
- To: svn-commits-list gnome org
- Subject: mousetweaks r206 - in trunk: . src
- Date: Tue, 8 Jul 2008 13:27:13 +0000 (UTC)
Author: gerdk
Date: Tue Jul 8 13:27:13 2008
New Revision: 206
URL: http://svn.gnome.org/viewvc/mousetweaks?rev=206&view=rev
Log:
2008-07-08 Gerd Kohlberger <gerdk svn gnome org>
* src/mt.main.c: Make sure we really click on the current positon of
the pointer. Part of the GOK workaround.
* src/mt-cursor-manager.c: Don't send cursor_changed signals if
the new cursor has no name.
eg. busy, custom pixmap cursors.
Modified:
trunk/ChangeLog
trunk/src/mt-cursor-manager.c
trunk/src/mt-main.c
Modified: trunk/src/mt-cursor-manager.c
==============================================================================
--- trunk/src/mt-cursor-manager.c (original)
+++ trunk/src/mt-cursor-manager.c Tue Jul 8 13:27:13 2008
@@ -171,30 +171,27 @@
if (xev->type == fixes_event + XFixesCursorNotify) {
XFixesCursorNotifyEvent *cn = (XFixesCursorNotifyEvent *) xev;
- MtCursorManager *manager = (MtCursorManager *) data;
if (cn->cursor_name != None) {
- MtCursorManagerPrivate *priv = MT_CURSOR_MANAGER_GET_PRIVATE (manager);
+ MtCursorManager *manager = data;
+ MtCursorManagerPrivate *priv;
+ priv = MT_CURSOR_MANAGER_GET_PRIVATE (manager);
if (!priv->cursor_set) {
XFixesCursorImage *image;
image = XFixesGetCursorImage (GDK_DISPLAY ());
- if (mt_cursor_manager_lookup_cursor (manager, image->name) == NULL)
+ if (!mt_cursor_manager_lookup_cursor (manager, image->name))
mt_cursor_manager_add_cursor (manager, image);
g_signal_emit (manager, signals[CURSOR_CHANGED], 0, image->name);
-
XFree (image);
}
else
priv->cursor_set = FALSE;
}
- else
- g_signal_emit (manager, signals[CURSOR_CHANGED], 0, "");
}
-
return GDK_FILTER_CONTINUE;
}
Modified: trunk/src/mt-main.c
==============================================================================
--- trunk/src/mt-main.c (original)
+++ trunk/src/mt-main.c Tue Jul 8 13:27:13 2008
@@ -62,9 +62,10 @@
static gboolean
dwell_b1r_timeout (gpointer data)
{
- MTClosure *mt = data;
+ gint x, y;
- SPI_generateMouseEvent (mt->pointer_x, mt->pointer_y, "b1r");
+ gdk_display_get_pointer (gdk_display_get_default (), NULL, &x, &y, NULL);
+ SPI_generateMouseEvent (x, y, "b1r");
return FALSE;
}
@@ -82,7 +83,7 @@
/* Wait a few msecs before releasing the button again.
* This allows GOK to see our clicks.
*/
- g_timeout_add (60, dwell_b1r_timeout, mt);
+ g_timeout_add (60, dwell_b1r_timeout, NULL);
break;
case DWELL_CLICK_TYPE_DOUBLE:
SPI_generateMouseEvent (x, y, "b1d");
@@ -293,8 +294,8 @@
draw_line (mt->pointer_x, mt->pointer_y,
event->detail1, event->detail2);
- mt->x_old = event->detail1;
- mt->y_old = event->detail2;
+ mt->x_old = (gint) event->detail1;
+ mt->y_old = (gint) event->detail2;
}
}
if (mt_timer_is_running (mt->delay_timer)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]