]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
dont retrurn a context while incoify animating
[chaz/openbox] / openbox / frame.c
index 8092e6c601347919fcd3098924d6ded7ea6de148..a07c60e46f9c4333f99e8d1765bc933ba5e483f3 100644 (file)
@@ -42,7 +42,7 @@
 #define INNER_EVENTMASK (ButtonPressMask)
 
 #define FRAME_ANIMATE_ICONIFY_STEPS 20
-#define FRAME_ANIMATE_ICONIFY_TIME (G_USEC_PER_SEC/10)
+#define FRAME_ANIMATE_ICONIFY_TIME (G_USEC_PER_SEC/5)
 
 #define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \
                            f->cbwidth_y)
@@ -601,7 +601,8 @@ void frame_release_client(ObFrame *self, ObClient *client)
     g_assert(self->client == client);
 
     /* if there was any animation going on, kill it */
-    ob_main_loop_timeout_remove(ob_main_loop, frame_animate_iconify);
+    ob_main_loop_timeout_remove_data(ob_main_loop, frame_animate_iconify,
+                                     self, FALSE);
 
     /* check if the app has already reparented its window away */
     while (XCheckTypedWindowEvent(ob_display, client->window,
@@ -837,6 +838,10 @@ ObFrameContext frame_context(ObClient *client, Window win)
     if (win == RootWindow(ob_display, ob_screen))
         return OB_FRAME_CONTEXT_DESKTOP;
     if (client == NULL) return OB_FRAME_CONTEXT_NONE;
+
+    self = client->frame;
+    if (self->iconify_animation_step) return OB_FRAME_CONTEXT_NONE;
+
     if (win == client->window) {
         /* conceptually, this is the desktop, as far as users are
            concerned */
@@ -845,7 +850,6 @@ ObFrameContext frame_context(ObClient *client, Window win)
         return OB_FRAME_CONTEXT_CLIENT;
     }
 
-    self = client->frame;
     if (win == self->inner || win == self->plate) {
         /* conceptually, this is the desktop, as far as users are
            concerned */
@@ -1120,7 +1124,8 @@ void frame_begin_iconify_animation(ObFrame *self, gboolean iconifying,
     if (self->iconify_animation_step == FRAME_ANIMATE_ICONIFY_STEPS ||
         self->iconify_animation_step == -FRAME_ANIMATE_ICONIFY_STEPS)
     {
-        ob_main_loop_timeout_remove(ob_main_loop, frame_animate_iconify);
+        ob_main_loop_timeout_remove_data(ob_main_loop, frame_animate_iconify,
+                                         self, FALSE);
         ob_main_loop_timeout_add(ob_main_loop,
                                  FRAME_ANIMATE_ICONIFY_TIME /
                                  FRAME_ANIMATE_ICONIFY_STEPS,
This page took 0.020962 seconds and 4 git commands to generate.