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".
This commit is contained in:
		 Matthias Clasen
					Matthias Clasen
				
			
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			 Matthias Clasen
						Matthias Clasen
					
				
			
						parent
						
							69c2585f0d
						
					
				
				
					commit
					fbb0ba1a3b
				
			| @ -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); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user