Commits

jjacky committed e30d970 Merge

merging hover-inactive

Comments (0)

Files changed (2)

 
     screen_info = c->screen_info;
 
+    if ((c->button_status[button] == BUTTON_STATE_PRELIGHT) &&
+         clientGetButtonPixmap (c, button, PRELIGHT))
+    {
+        return (PRELIGHT);
+    }
+
     if (state == INACTIVE)
     {
         return (state);
         return (PRESSED);
     }
 
-    if ((c->button_status[button] == BUTTON_STATE_PRELIGHT) &&
-        clientGetButtonPixmap (c, button, PRELIGHT))
-    {
-        return (PRELIGHT);
-    }
-
     return (ACTIVE);
 }
 
                 clientClearDelayedFocus ();
             }
         }
-        if (c == clientGetFocus ())
+        for (b = 0; b < BUTTON_COUNT; b++)
         {
-            for (b = 0; b < BUTTON_COUNT; b++)
+            if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
             {
-                if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
+                if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
                 {
-                    if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
-                    {
-                        c->button_status[b] = BUTTON_STATE_PRELIGHT;
-                        need_redraw = TRUE;
-                    }
+                    c->button_status[b] = BUTTON_STATE_PRELIGHT;
+                    need_redraw = TRUE;
                 }
             }
-            if (need_redraw)
-            {
-                frameQueueDraw (c, FALSE);
-            }
+        }
+        if (need_redraw)
+        {
+            frameQueueDraw (c, FALSE);
         }
 
         /* No need to process the event any further */