Introduction
Introduction Statistics Contact Development Disclaimer Help
tfixed focus steeling bug done by clients like opera - dwm - [fork] customized …
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 68ff133857244347cc6c8512040f1eb32fe2ed2f
parent 4380db468aa81f73e3a31f434bc5bd4a2fe35bf0
Author: Anselm R. Garbe <[email protected]>
Date: Sat, 17 Nov 2007 19:59:13 +0100
fixed focus steeling bug done by clients like opera
Diffstat:
M dwm.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -137,6 +137,7 @@ void eprint(const char *errstr, ...);
void expose(XEvent *e);
void floating(void); /* default floating layout */
void focus(Client *c);
+void focusin(XEvent *e);
void focusnext(const char *arg);
void focusprev(const char *arg);
Client *getclient(Window w);
t@@ -206,9 +207,10 @@ void (*handler[LASTEvent]) (XEvent *) = {
[ConfigureNotify] = configurenotify,
[DestroyNotify] = destroynotify,
[EnterNotify] = enternotify,
- [LeaveNotify] = leavenotify,
[Expose] = expose,
+ [FocusIn] = focusin,
[KeyPress] = keypress,
+ [LeaveNotify] = leavenotify,
[MappingNotify] = mappingnotify,
[MapRequest] = maprequest,
[PropertyNotify] = propertynotify,
t@@ -710,6 +712,14 @@ focus(Client *c) {
}
void
+focusin(XEvent *e) { /* there are some broken focus acquiring clients */
+ XFocusChangeEvent *ev = &e->xfocus;
+
+ if(sel && ev->window != sel->win)
+ XSetInputFocus(dpy, sel->win, RevertToPointerRoot, CurrentTime…
+}
+
+void
focusnext(const char *arg) {
Client *c;
t@@ -1026,8 +1036,7 @@ manage(Window w, XWindowAttributes *wa) {
XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
configure(c); /* propagates border_width, if size doesn't change */
updatesizehints(c);
- XSelectInput(dpy, w,
- StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
+ XSelectInput(dpy, w, EnterWindowMask | FocusChangeMask | PropertyChang…
grabbuttons(c, False);
updatetitle(c);
if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success))
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.