diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-12-16 00:56:48 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-12-16 00:56:48 +0000 |
commit | fbb0ba1a3b4fc044247a8597678f283b28bc6e91 (patch) | |
tree | 10455f458c533efed9dfbbf1dbdde7ec8766183a /gdk/gdkdisplay.h | |
parent | 69c2585f0d78c5c00b0dff296b28eddea964ed1f (diff) | |
download | gtk+-fbb0ba1a3b4fc044247a8597678f283b28bc6e91.tar.gz |
Do not interpret distant clicks as double-clicks (#116541, Bernhard
Tue Dec 16 01:46:46 2003 Matthias Clasen <maclas@gmx.de>
Do not interpret distant clicks as double-clicks (#116541,
Bernhard Walle):
* gdk/gdkdisplay.h (struct GdkDisplay): Add new fields
double_click_distance, button_x and button_y.
* gdk/gdkdisplay.c (gdk_display_init): Initialize the new fields.
* gdk/gdkdisplay.h:
* gdk/gdkevents.c (gdk_display_set_double_click_distance):
New function to set the double click distance on a display.
* gdk/gdkevents.c: Take double click distance into account
when generating single, double or triple clicks.
* gtk/gtksettings.c: Add new setting "gtk-double-click-distance".
* gdk/x11/gdkevents-x11.c: Add the XSetting
"Net/DoubleClickDistance" and map it to "gtk-double-click-distance".
Diffstat (limited to 'gdk/gdkdisplay.h')
-rw-r--r-- | gdk/gdkdisplay.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h index bbf0d7591c..2bbc7eb8e8 100644 --- a/gdk/gdkdisplay.h +++ b/gdk/gdkdisplay.h @@ -40,7 +40,6 @@ typedef struct _GdkDisplayPointerHooks GdkDisplayPointerHooks; #define GDK_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY)) #define GDK_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY, GdkDisplayClass)) - struct _GdkDisplay { GObject parent_instance; @@ -62,6 +61,10 @@ struct _GdkDisplay const GdkDisplayPointerHooks *pointer_hooks; /* Current hooks for querying pointer */ guint closed : 1; /* Whether this display has been closed */ + + guint double_click_distance; /* Maximum distance between clicks in pixels */ + gint button_x[2]; /* The last 2 button click positions. */ + gint button_y[2]; }; struct _GdkDisplayClass @@ -129,8 +132,10 @@ void gdk_display_add_client_message_filter (GdkDisplay *display, GdkFilterFunc func, gpointer data); -void gdk_display_set_double_click_time (GdkDisplay *display, - guint msec); +void gdk_display_set_double_click_time (GdkDisplay *display, + guint msec); +void gdk_display_set_double_click_distance (GdkDisplay *display, + guint distance); GdkDisplay *gdk_display_get_default (void); |