? gdk/quartz/Makefile
? gdk/quartz/Makefile.in
Index: gdk/gdkevents.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkevents.c,v
retrieving revision 1.76
diff -u -r1.76 gdkevents.c
--- gdk/gdkevents.c	6 Dec 2005 10:40:09 -0000	1.76
+++ gdk/gdkevents.c	10 Jan 2006 15:04:04 -0000
@@ -1014,7 +1014,7 @@
 		      gint	  nclicks)
 {
   GdkEvent temp_event;
-  
+
   g_return_if_fail (event != NULL);
   
   temp_event = *event;
@@ -1032,9 +1032,9 @@
       (event->button.button == display->button_number[1]) &&
       (ABS (event->button.x - display->button_x[1]) <= display->double_click_distance) &&
       (ABS (event->button.y - display->button_y[1]) <= display->double_click_distance))
-{
+    {
       gdk_synthesize_click (display, event, 3);
-            
+      
       display->button_click_time[1] = 0;
       display->button_click_time[0] = 0;
       display->button_window[1] = NULL;
@@ -1051,31 +1051,50 @@
 	   (ABS (event->button.y - display->button_y[0]) <= display->double_click_distance))
     {
       gdk_synthesize_click (display, event, 2);
-      
-      display->button_click_time[1] = display->button_click_time[0];
-      display->button_click_time[0] = event->button.time;
-      display->button_window[1] = display->button_window[0];
-      display->button_window[0] = event->button.window;
-      display->button_number[1] = display->button_number[0];
-      display->button_number[0] = event->button.button;
-      display->button_x[1] = display->button_x[0];
-      display->button_x[0] = event->button.x;
-      display->button_y[1] = display->button_y[0];
-      display->button_y[0] = event->button.y;
+     
+      if (gdk_window_get_max_clicks (event->button.window) >= 3)
+	{
+	  display->button_click_time[1] = display->button_click_time[0];
+	  display->button_click_time[0] = event->button.time;
+	  display->button_window[1] = display->button_window[0];
+	  display->button_window[0] = event->button.window;
+	  display->button_number[1] = display->button_number[0];
+	  display->button_number[0] = event->button.button;
+	  display->button_x[1] = display->button_x[0];
+	  display->button_x[0] = event->button.x;
+	  display->button_y[1] = display->button_y[0];
+	  display->button_y[0] = event->button.y;
+	  
+	  return;
+	}
     }
   else
     {
-      display->button_click_time[1] = 0;
-      display->button_click_time[0] = event->button.time;
-      display->button_window[1] = NULL;
-      display->button_window[0] = event->button.window;
-      display->button_number[1] = -1;
-      display->button_number[0] = event->button.button;
-      display->button_x[1] = 0;
-      display->button_x[0] = event->button.x;
-      display->button_y[1] = 0;
-      display->button_y[0] = event->button.y;
+      if (gdk_window_get_max_clicks (event->button.window) >= 2)
+	{
+	  display->button_click_time[1] = 0;
+	  display->button_click_time[0] = event->button.time;
+	  display->button_window[1] = NULL;
+	  display->button_window[0] = event->button.window;
+	  display->button_number[1] = -1;
+	  display->button_number[0] = event->button.button;
+	  display->button_x[1] = 0;
+	  display->button_x[0] = event->button.x;
+	  display->button_y[1] = 0;
+	  display->button_y[0] = event->button.y;
+
+	  return;
+	}
     }
+  
+  display->button_click_time[1] = 0;
+  display->button_click_time[0] = 0;
+  display->button_window[1] = NULL;
+  display->button_window[0] = NULL;;
+  display->button_number[1] = -1;
+  display->button_number[0] = -1;
+  display->button_x[0] = display->button_x[1] = 0;
+  display->button_y[0] = display->button_y[1] = 0;
 }
 
 void
Index: gdk/gdkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.c,v
retrieving revision 1.180
diff -u -r1.180 gdkwindow.c
--- gdk/gdkwindow.c	10 Nov 2005 12:09:40 -0000	1.180
+++ gdk/gdkwindow.c	10 Jan 2006 15:04:04 -0000
@@ -2909,5 +2909,50 @@
   return gdk_window_foreign_new_for_display (gdk_display_get_default (), anid);
 }
 
+/**
+ * gdk_window_set_max_clicks:
+ * @window: a #GdkWindow
+ * @max_clicks: a number between 1 and 3, indicating wether 
+ *    %GDK_2BUTTON_PRESS or %GTK_3BUTTON_PRESS events are
+ *    generated for @window
+ *
+ * Determines which multi-click events are generated for @window.
+ * if @max_clicks is 1, no multi-click events are generated, if it
+ * is 2, only %GTK_2BUTTON_PRESS events are generated. The default
+ * value is 3, meaning that all multi-click events are generated.
+ *
+ * Since: 2.10
+ **/
+void
+gdk_window_set_max_clicks (GdkWindow *window,
+			   gint       max_clicks)
+{
+  g_return_if_fail (GDK_IS_WINDOW (window));
+  g_return_if_fail (1 <= max_clicks && max_clicks <= 3);
+
+  ((GdkWindowObject *)window)->max_clicks = max_clicks;
+}
+
+
+/**
+ * gdk_window_get_max_clicks:
+ * @window: a #GdkWindow
+ *
+ * Returns a number indicating which multi-click events are generated
+ * for @window. See gdk_window_set_max_clicks().
+ *
+ * Return value: a number indicating which multi-click events are generated.
+ *
+ * Since: 2.10
+ **/
+gint
+gdk_window_get_max_clicks (GdkWindow *window)
+{
+  g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
+
+  return ((GdkWindowObject *)window)->max_clicks;
+}
+
+
 #define __GDK_WINDOW_C__
 #include "gdkaliasdef.c"
Index: gdk/gdkwindow.h
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.h,v
retrieving revision 1.57
diff -u -r1.57 gdkwindow.h
--- gdk/gdkwindow.h	8 Nov 2005 14:45:16 -0000	1.57
+++ gdk/gdkwindow.h	10 Jan 2006 15:04:04 -0000
@@ -280,14 +280,15 @@
   GdkWindowState state;
   
   guint guffaw_gravity : 1;
-  guint input_only : 1;
-  guint modal_hint : 1;
+  guint input_only     : 1;
+  guint modal_hint     : 1;
   
-  guint destroyed : 2;
+  guint destroyed      : 2;
 
-  guint accept_focus : 1;
-  guint focus_on_map : 1;
-  guint shaped : 1;
+  guint accept_focus   : 1;
+  guint focus_on_map   : 1;
+  guint shaped         : 1;
+  guint max_clicks     : 2;
   
   GdkEventMask event_mask;
 };
@@ -362,6 +363,10 @@
 						GdkRegion *region,
 						gint       dx,
 						gint       dy);
+void	      gdk_window_set_max_clicks        (GdkWindow *window,
+						gint       max_clicks);
+gint         gdk_window_get_max_clicks         (GdkWindow *window);
+
 
 /* 
  * This allows for making shaped (partially transparent) windows
