pass mouse clicks through to windows properly
This commit is contained in:
parent
16ed0f7f24
commit
9612bd6ee2
4 changed files with 14 additions and 4 deletions
2
client.c
2
client.c
|
@ -36,7 +36,7 @@ void setactive(Client* c, int on) {
|
|||
c->parent,
|
||||
False,
|
||||
ButtonMask,
|
||||
GrabModeAsync,
|
||||
GrabModeSync,
|
||||
GrabModeSync,
|
||||
None,
|
||||
None);
|
||||
|
|
4
event.c
4
event.c
|
@ -62,8 +62,10 @@ void mainloop(int shape_event) {
|
|||
break;
|
||||
case ButtonPress:
|
||||
button(&ev.xbutton);
|
||||
XAllowEvents(dpy, ReplayPointer, ev.xbutton.time);
|
||||
break;
|
||||
case ButtonRelease:
|
||||
XAllowEvents(dpy, ReplayPointer, ev.xbutton.time);
|
||||
break;
|
||||
case MapRequest:
|
||||
mapreq(&ev.xmaprequest);
|
||||
|
@ -238,7 +240,7 @@ void mapreq(XMapRequestEvent* e) {
|
|||
return;
|
||||
break;
|
||||
}
|
||||
XReparentWindow(dpy, c->window, c->parent, BORDER - 1, BORDER - 1);
|
||||
XReparentWindow(dpy, c->window, c->parent, BORDER, BORDER);
|
||||
XAddToSaveSet(dpy, c->window);
|
||||
/* fall through... */
|
||||
case NormalState:
|
||||
|
|
4
manage.c
4
manage.c
|
@ -30,6 +30,7 @@ int manage(Client* c, int mapped) {
|
|||
XWMHints* hints;
|
||||
XSetWindowAttributes attrs;
|
||||
XRRMonitorInfo monitor;
|
||||
ScreenInfo* screen;
|
||||
|
||||
trace("manage", c, 0);
|
||||
XSelectInput(
|
||||
|
@ -141,9 +142,10 @@ int manage(Client* c, int mapped) {
|
|||
}
|
||||
|
||||
if (c->is9term && !(fixsize ? drag(c, Button3) : sweep(c, Button3))) {
|
||||
screen = c->screen;
|
||||
XKillClient(dpy, c->window);
|
||||
rmclient(c);
|
||||
if (current && current->screen == c->screen)
|
||||
if (current && current->screen == screen)
|
||||
cmapfocus(current);
|
||||
return 0;
|
||||
}
|
||||
|
|
8
menu.c
8
menu.c
|
@ -146,8 +146,8 @@ void button(XButtonEvent* e) {
|
|||
case Button2:
|
||||
if (c) {
|
||||
XMapRaised(dpy, c->parent);
|
||||
top(c);
|
||||
active(c);
|
||||
XAllowEvents(dpy, ReplayPointer, curtime);
|
||||
} else if (
|
||||
(e->state & (ShiftMask | ControlMask)) == (ShiftMask | ControlMask)) {
|
||||
menuhit(e, &egg);
|
||||
|
@ -155,6 +155,12 @@ void button(XButtonEvent* e) {
|
|||
button2(n);
|
||||
return;
|
||||
case Button3:
|
||||
if (c) {
|
||||
XMapRaised(dpy, c->parent);
|
||||
top(c);
|
||||
active(c);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Button4:
|
||||
/* scroll up changes to previous virtual screen, wraps around */
|
||||
|
|
Loading…
Reference in a new issue