Maus-Fokus Problem bei Websites behoben
This commit is contained in:
8
event.c
8
event.c
@@ -169,13 +169,13 @@ void button_press(XEvent *ev)
|
|||||||
int i, j; Monitor *m;
|
int i, j; Monitor *m;
|
||||||
XButtonEvent *e = &ev->xbutton;
|
XButtonEvent *e = &ev->xbutton;
|
||||||
latest_action = e->time;
|
latest_action = e->time;
|
||||||
Client *c = window_build_client(e->subwindow);
|
Client *c = window_build_client(e->window);
|
||||||
if (c && c->manage)
|
if (c && c->manage && c->window != current)
|
||||||
client_activate(c);
|
client_activate(c);
|
||||||
else
|
else
|
||||||
if (settings.title)
|
if (settings.title && !c)
|
||||||
for_monitors(i, m) for_spots(j)
|
for_monitors(i, m) for_spots(j)
|
||||||
if (m->bars[i] && m->bars[j]->window == e->subwindow)
|
if (m->bars[j] && m->bars[j]->window == e->window)
|
||||||
spot_focus_top_window(j, i, None);
|
spot_focus_top_window(j, i, None);
|
||||||
client_free(c);
|
client_free(c);
|
||||||
XAllowEvents(display, ReplayPointer, latest_action);
|
XAllowEvents(display, ReplayPointer, latest_action);
|
||||||
|
|||||||
4
setup.c
4
setup.c
@@ -192,9 +192,7 @@ void setup()
|
|||||||
XGrabKey(display, XKeysymToKeycode(display, settings.bindings[i].key), settings.bindings[i].mod|LockMask|NumlockMask, root, True, GrabModeAsync, GrabModeAsync);
|
XGrabKey(display, XKeysymToKeycode(display, settings.bindings[i].key), settings.bindings[i].mod|LockMask|NumlockMask, root, True, GrabModeAsync, GrabModeAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
// we grab buttons to do click-to-focus. all clicks get passed through to apps.
|
// Button grabs are now done per-client in window_listen() to avoid LeaveNotify issues
|
||||||
XGrabButton(display, Button1, AnyModifier, root, True, ButtonPressMask, GrabModeSync, GrabModeSync, None, None);
|
|
||||||
XGrabButton(display, Button3, AnyModifier, root, True, ButtonPressMask, GrabModeSync, GrabModeSync, None, None);
|
|
||||||
|
|
||||||
// create title bars
|
// create title bars
|
||||||
if (settings.title)
|
if (settings.title)
|
||||||
|
|||||||
2
window.c
2
window.c
@@ -103,6 +103,8 @@ int window_send_clientmessage(Window target, Window subject, Atom atom, unsigned
|
|||||||
void window_listen(Window win)
|
void window_listen(Window win)
|
||||||
{
|
{
|
||||||
XSelectInput(display, win, EnterWindowMask | LeaveWindowMask | FocusChangeMask | PropertyChangeMask);
|
XSelectInput(display, win, EnterWindowMask | LeaveWindowMask | FocusChangeMask | PropertyChangeMask);
|
||||||
|
XGrabButton(display, Button1, AnyModifier, win, True, ButtonPressMask, GrabModeSync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(display, Button3, AnyModifier, win, True, ButtonPressMask, GrabModeSync, GrabModeSync, None, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
// build windows cache
|
// build windows cache
|
||||||
|
|||||||
Reference in New Issue
Block a user