--- tme/host/gtk/gtk-mouse.c 2018/04/24 16:39:15 1.1.1.1 +++ tme/host/gtk/gtk-mouse.c 2018/04/24 16:42:27 1.1.1.2 @@ -1,4 +1,4 @@ -/* $Id: gtk-mouse.c,v 1.1.1.1 2018/04/24 16:39:15 root Exp $ */ +/* $Id: gtk-mouse.c,v 1.1.1.2 2018/04/24 16:42:27 root Exp $ */ /* host/gtk/gtk-mouse.c - GTK mouse support: */ @@ -34,7 +34,7 @@ */ #include -_TME_RCSID("$Id: gtk-mouse.c,v 1.1.1.1 2018/04/24 16:39:15 root Exp $"); +_TME_RCSID("$Id: gtk-mouse.c,v 1.1.1.2 2018/04/24 16:42:27 root Exp $"); /* includes: */ #include "gtk-display.h" @@ -49,18 +49,18 @@ _TME_RCSID("$Id: gtk-mouse.c,v 1.1.1.1 2 /* globals: */ /* our invisible cursor: */ -static const unsigned char _tme_gtk_mouse_cursor_source[(TME_GTK_MOUSE_CURSOR_WIDTH - * TME_GTK_MOUSE_CURSOR_HEIGHT - / 8)] = +static const gchar _tme_gtk_mouse_cursor_source[(TME_GTK_MOUSE_CURSOR_WIDTH + * TME_GTK_MOUSE_CURSOR_HEIGHT + / 8)] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -static const unsigned char _tme_gtk_mouse_cursor_mask[(TME_GTK_MOUSE_CURSOR_WIDTH - * TME_GTK_MOUSE_CURSOR_HEIGHT - / 8)] = +static const gchar _tme_gtk_mouse_cursor_mask[(TME_GTK_MOUSE_CURSOR_WIDTH + * TME_GTK_MOUSE_CURSOR_HEIGHT + / 8)] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -118,8 +118,8 @@ _tme_gtk_mouse_mouse_event(GtkWidget *wi { struct tme_gtk_display *display; struct tme_mouse_event tme_event; - guint x; - guint y; + gint x; + gint y; guint state, button; unsigned int buttons; int was_empty; @@ -170,6 +170,20 @@ _tme_gtk_mouse_mouse_event(GtkWidget *wi _tme_gtk_mouse_warp_pointer(screen); } + /* otherwise, if this is a double- or triple-click: */ + else if (gdk_event_raw->type == GDK_2BUTTON_PRESS + || gdk_event_raw->type == GDK_3BUTTON_PRESS) { + + /* we ignore double- and triple-click events, since normal button + press and release events are always generated also: */ + + /* unlock the mutex: */ + tme_mutex_unlock(&display->tme_gtk_display_mutex); + + /* stop propagating this event: */ + return (TRUE); + } + /* otherwise, this must be a button press or a release: */ else { assert (gdk_event_raw->type == GDK_BUTTON_PRESS