]> granicus.if.org Git - graphviz/commitdiff
attempt to rotation lag on mac
authorarif <devnull@localhost>
Fri, 16 Jul 2010 17:28:07 +0000 (17:28 +0000)
committerarif <devnull@localhost>
Fri, 16 Jul 2010 17:28:07 +0000 (17:28 +0000)
cmd/smyrna/gui/appmouse.c
cmd/smyrna/smyrnadefs.h
cmd/smyrna/viewport.c

index 7ce9e1a513717790cae2051e276555d2ec791a7e..4da883b737b9c8449579c7df54280ca81cffdf49 100644 (file)
@@ -36,15 +36,29 @@ static void apply_actions(ViewInfo* v,int x,int y)
     if (a==MM_ROTATE)
 
     {
-       view->arcball->MousePt.s.X = (GLfloat) x;
-       view->arcball->MousePt.s.Y = (GLfloat) y;
-       if (!view->arcball->isDragging) {
-           arcmouseClick(view);
-        view->arcball->isDragging = 1;
+
+
+       gdouble seconds;
+       seconds = g_timer_elapsed(view->timer3, NULL);
+       if (seconds > 1) {
+           g_timer_stop(view->timer2);
+               view->arcball->MousePt.s.X = (GLfloat) x;
+               view->arcball->MousePt.s.Y = (GLfloat) y;
+               if (!view->arcball->isDragging) {
+                   arcmouseClick(view);
+               view->arcball->isDragging = 1;
+               }
+               else 
+                   arcmouseDrag(view);
+           g_timer_start(view->timer2);
        }
-       else 
-            arcmouseDrag(view);
+
+
        return;
+
+
+
+
     }
     if (a==MM_PAN)
     {
index 5340f43de101e1853b37f0caba7de736cdd27ac5..645376da58deb2bd767cb5afb7e62373c5d10eef 100644 (file)
@@ -668,6 +668,8 @@ typedef struct
        GTimer *timer;
        /*this timer is session timer and always active */
        GTimer *timer2;
+       /*general purpose timer */
+       GTimer *timer3;
        int active_frame;
        int total_frames;
        int frame_length;
index 5b3fc98597b3157487c99e987a891f4559ad2cd8..68274e5d23bf16185e519b11c86998c0994dca5f 100755 (executable)
@@ -484,6 +484,7 @@ void init_viewport(ViewInfo * view)
     /*create timer */
     view->timer = g_timer_new();
     view->timer2 = g_timer_new();
+    view->timer3 = g_timer_new();
 
     g_timer_stop(view->timer);
     view->active_frame = 0;