summaryrefslogtreecommitdiff
blob: a6b01366c1b0b8fa9fb91f630ababa47979d445e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- scilab-4.0/routines/graphics/periGtk.c	2006-02-08 11:33:40.000000000 -0500
+++ scilab-4.0-b4-20060515/routines/graphics/periGtk.c	2006-02-20 04:05:05.000000000 -0500
@@ -395,16 +395,17 @@
 				       GdkEventButton *event,
 				       BCG *gc)
 {
+  int display_double_click_distance;
   static GdkDisplay *display=NULL;
+  if ( display == NULL) display=gdk_display_get_default();
 
 /* to compile with gdk<2.4 */
 #if GTK_MAJOR_VERSION==2 &&  GTK_MINOR_VERSION>=4
-  int display_double_click_distance = display->double_click_distance;
+  display_double_click_distance = display->double_click_distance;
 #else
-  int display_double_click_distance=5;
+  display_double_click_distance=5;
 #endif
 
-  if ( display == NULL) display=gdk_display_get_default();
   if ((event->time < (last_press.time + 2*display->double_click_time)) &&
       (event->window == last_press.window) &&
       (event->button == last_press.button) &&