updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / xfwm4-hover-inactive / hover-inactive.patch
blob3dc8789b4ef43910feb7dd55e332da44ec427c86
1 diff -r 6ae1e81f12d7 src/client.c
2 --- a/src/client.c Tue Dec 20 20:30:57 2011 +0100
3 +++ b/src/client.c Tue Dec 20 20:41:38 2011 +0100
4 @@ -3795,6 +3795,12 @@
5 int
6 clientGetButtonState (Client *c, int button, int state)
8 + if ((c->button_status[button] == BUTTON_STATE_PRELIGHT) &&
9 + clientGetButtonPixmap (c, button, PRELIGHT))
10 + {
11 + return (PRELIGHT);
12 + }
14 if (state == INACTIVE)
16 return (state);
17 @@ -3806,12 +3812,6 @@
18 return (PRESSED);
21 - if ((c->button_status[button] == BUTTON_STATE_PRELIGHT) &&
22 - clientGetButtonPixmap (c, button, PRELIGHT))
23 - {
24 - return (PRELIGHT);
25 - }
27 return (ACTIVE);
30 diff -r 6ae1e81f12d7 src/events.c
31 --- a/src/events.c Tue Dec 20 20:30:57 2011 +0100
32 +++ b/src/events.c Tue Dec 20 20:41:38 2011 +0100
33 @@ -1380,23 +1380,20 @@
34 clientClearDelayedFocus ();
37 - if (c == clientGetFocus ())
38 + for (b = 0; b < BUTTON_COUNT; b++)
40 - for (b = 0; b < BUTTON_COUNT; b++)
41 + if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
43 - if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
44 + if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
46 - if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
47 - {
48 - c->button_status[b] = BUTTON_STATE_PRELIGHT;
49 - need_redraw = TRUE;
50 - }
51 + c->button_status[b] = BUTTON_STATE_PRELIGHT;
52 + need_redraw = TRUE;
55 - if (need_redraw)
56 - {
57 - frameQueueDraw (c, FALSE);
58 - }
59 + }
60 + if (need_redraw)
61 + {
62 + frameQueueDraw (c, FALSE);
65 /* No need to process the event any further */