1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
diff -r c7e59386ff22 src/client.c
--- a/src/client.c Mon Apr 30 10:18:03 2012 +0200
+++ b/src/client.c Mon Apr 30 10:52:33 2012 +0200
@@ -3851,6 +3851,12 @@
int
clientGetButtonState (Client *c, int button, int state)
{
+ if ((c->button_status[button] == BUTTON_STATE_PRELIGHT) &&
+ clientGetButtonPixmap (c, button, PRELIGHT))
+ {
+ return (PRELIGHT);
+ }
+
if (state == INACTIVE)
{
return (state);
@@ -3862,12 +3868,6 @@
return (PRESSED);
}
- if ((c->button_status[button] == BUTTON_STATE_PRELIGHT) &&
- clientGetButtonPixmap (c, button, PRELIGHT))
- {
- return (PRELIGHT);
- }
-
return (ACTIVE);
}
diff -r c7e59386ff22 src/events.c
--- a/src/events.c Mon Apr 30 10:18:03 2012 +0200
+++ b/src/events.c Mon Apr 30 10:52:33 2012 +0200
@@ -1394,23 +1394,20 @@
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 */
|