]> Dogcows Code - chaz/openbox/commitdiff
less redrawing
authorDana Jansens <danakj@orodu.net>
Wed, 9 May 2007 23:45:44 +0000 (23:45 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 9 May 2007 23:45:44 +0000 (23:45 +0000)
openbox/event.c

index 8523f637448db9e9dc18686579d0064b368a2be2..566739c96262d8713de665d7f6de0901cf19cf6d 100644 (file)
@@ -791,32 +791,47 @@ static void event_handle_client(ObClient *client, XEvent *e)
         switch (con) {
         case OB_FRAME_CONTEXT_TITLEBAR:
             /* we've left the button area inside the titlebar */
-            client->frame->max_hover = FALSE;
-            client->frame->desk_hover = FALSE;
-            client->frame->shade_hover = FALSE;
-            client->frame->iconify_hover = FALSE;
-            client->frame->close_hover = FALSE;
-            frame_adjust_state(client->frame);
+            if (client->frame->max_hover || client->frame->desk_hover ||
+                client->frame->shade_hover || client->frame->iconify_hover ||
+                client->frame->close_hover)
+            {
+                client->frame->max_hover = FALSE;
+                client->frame->desk_hover = FALSE;
+                client->frame->shade_hover = FALSE;
+                client->frame->iconify_hover = FALSE;
+                client->frame->close_hover = FALSE;
+                frame_adjust_state(client->frame);
+            }
             break;
         case OB_FRAME_CONTEXT_MAXIMIZE:
-            client->frame->max_hover = TRUE;
-            frame_adjust_state(client->frame);
+            if (!client->frame->max_hover) {
+                client->frame->max_hover = TRUE;
+                frame_adjust_state(client->frame);
+            }
             break;
         case OB_FRAME_CONTEXT_ALLDESKTOPS:
-            client->frame->desk_hover = TRUE;
-            frame_adjust_state(client->frame);
+            if (!client->frame->desk_hover) {
+                client->frame->desk_hover = TRUE;
+                frame_adjust_state(client->frame);
+            }
             break;
         case OB_FRAME_CONTEXT_SHADE:
-            client->frame->shade_hover = TRUE;
-            frame_adjust_state(client->frame);
+            if (!client->frame->shade_hover) {
+                client->frame->shade_hover = TRUE;
+                frame_adjust_state(client->frame);
+            }
             break;
         case OB_FRAME_CONTEXT_ICONIFY:
-            client->frame->iconify_hover = TRUE;
-            frame_adjust_state(client->frame);
+            if (!client->frame->iconify_hover) {
+                client->frame->iconify_hover = TRUE;
+                frame_adjust_state(client->frame);
+            }
             break;
         case OB_FRAME_CONTEXT_CLOSE:
-            client->frame->close_hover = TRUE;
-            frame_adjust_state(client->frame);
+            if (!client->frame->close_hover) {
+                client->frame->close_hover = TRUE;
+                frame_adjust_state(client->frame);
+            }
             break;
         default:
             break;
This page took 0.026168 seconds and 4 git commands to generate.