mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
Refocus focused window for focus in events on the root window. (#3543)
This deals with (admittedly somewhat misbehaving) clients which
use XSetInputFocus to take focus, but then don't properly restore
focus. This has been observed with TK apps, but also, e.g., Steam.
Ported from a06e66982b
by @psychon
Fixes https://github.com/awesomeWM/awesome/issues/3379
This commit is contained in:
parent
21b908bef9
commit
cd4008c249
1 changed files with 5 additions and 0 deletions
5
event.c
5
event.c
|
@ -696,6 +696,11 @@ event_handle_enternotify(xcb_enter_notify_event_t *ev)
|
|||
static void
|
||||
event_handle_focusin(xcb_focus_in_event_t *ev)
|
||||
{
|
||||
if (ev->event == globalconf.screen->root) {
|
||||
/* Received focus in for root window, refocusing the focused window */
|
||||
globalconf.focus.need_update = true;
|
||||
}
|
||||
|
||||
if (ev->mode == XCB_NOTIFY_MODE_GRAB
|
||||
|| ev->mode == XCB_NOTIFY_MODE_UNGRAB)
|
||||
/* Ignore focus changes due to keyboard grabs */
|
||||
|
|
Loading…
Reference in a new issue