Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
I don't see any reason why we should select for input on override-redirect windows?
[dwm.git]
/
event.c
diff --git
a/event.c
b/event.c
index
4f07789
..
4e4649b
100644
(file)
--- a/
event.c
+++ b/
event.c
@@
-82,7
+82,10
@@
resizemouse(Client *c) {
switch(ev.type) {
case ButtonRelease:
resize(c, True);
switch(ev.type) {
case ButtonRelease:
resize(c, True);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0,
+ c->w + c->border - 1, c->h + c->border - 1);
XUngrabPointer(dpy, CurrentTime);
XUngrabPointer(dpy, CurrentTime);
+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
return;
case ConfigureRequest:
case Expose:
return;
case ConfigureRequest:
case Expose:
@@
-230,7
+233,7
@@
enternotify(XEvent *e) {
if((c = getclient(ev->window)) && isvisible(c))
focus(c);
else if(ev->window == root) {
if((c = getclient(ev->window)) && isvisible(c))
focus(c);
else if(ev->window == root) {
-
active
screen = True;
+
sel
screen = True;
for(c = stack; c && !isvisible(c); c = c->snext);
focus(c);
}
for(c = stack; c && !isvisible(c); c = c->snext);
focus(c);
}
@@
-269,7
+272,7
@@
leavenotify(XEvent *e) {
XCrossingEvent *ev = &e->xcrossing;
if((ev->window == root) && !ev->same_screen) {
XCrossingEvent *ev = &e->xcrossing;
if((ev->window == root) && !ev->same_screen) {
-
active
screen = False;
+
sel
screen = False;
focus(NULL);
}
}
focus(NULL);
}
}
@@
-290,11
+293,8
@@
maprequest(XEvent *e) {
if(!XGetWindowAttributes(dpy, ev->window, &wa))
return;
if(!XGetWindowAttributes(dpy, ev->window, &wa))
return;
- if(wa.override_redirect) {
- XSelectInput(dpy, ev->window,
- (StructureNotifyMask | PropertyChangeMask));
+ if(wa.override_redirect)
return;
return;
- }
if(!getclient(ev->window))
manage(ev->window, &wa);
}
if(!getclient(ev->window))
manage(ev->window, &wa);
}
@@
-308,10
+308,6
@@
propertynotify(XEvent *e) {
if(ev->state == PropertyDelete)
return; /* ignore */
if((c = getclient(ev->window))) {
if(ev->state == PropertyDelete)
return; /* ignore */
if((c = getclient(ev->window))) {
- if(ev->atom == wmatom[WMProtocols]) {
- c->proto = getproto(c->win);
- return;
- }
switch (ev->atom) {
default: break;
case XA_WM_TRANSIENT_FOR:
switch (ev->atom) {
default: break;
case XA_WM_TRANSIENT_FOR: