1 static Client
*msel
= NULL
;
4 mouse_focus(const char *args
[]) {
11 mouse_fullscreen(const char *args
[]) {
13 if (isarrange(fullscreen
))
20 mouse_minimize(const char *args
[]) {
26 mouse_zoom(const char *args
[]) {
32 get_client_by_coord(int x
, int y
) {
34 if (y
< way
|| y
>= wah
)
36 if (isarrange(fullscreen
))
38 for (c
= clients
; c
; c
= c
->next
) {
39 if (x
>= c
->x
&& x
< c
->x
+ c
->w
&& y
>= c
->y
&& y
< c
->y
+ c
->h
) {
40 debug("mouse event, x: %d y: %d client: %d\n", x
, y
, c
->order
);
51 if (getmouse(&event
) != OK
)
53 msel
= get_client_by_coord(event
.x
, event
.y
);
56 for (i
= 0; i
< countof(buttons
); i
++)
57 if (event
.bstate
& buttons
[i
].mask
)
58 buttons
[i
].action
.cmd(buttons
[i
].action
.args
);
66 for (i
= 0, mask
= 0; i
< countof(buttons
); i
++)
67 mask
|= buttons
[i
].mask
;
69 mousemask(mask
, NULL
);