diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-10-12 20:28:35 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-10-12 20:28:35 +0000 |
| commit | 568744d572c68c164492096f2fbe2ea3ae291170 (patch) | |
| tree | 9e95c32c60d7a5c64a32e519bb97c48308b79d53 /openbox | |
| parent | d2d10fb6c925aba6bf0a44ec5cbd77fefa8184ee (diff) | |
allow focus to be moved off top level managed windows, as long as its not None or the root.
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/event.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/openbox/event.c b/openbox/event.c index 05024e72..bb138d3d 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -355,8 +355,15 @@ static void event_done(gpointer data) focus_hilite = focus_in; if (focus_client != last) { - if (!focus_client) - focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); + if (!focus_client) { + Window w; + int r; + + /* is focus anywhere valid? */ + XGetInputFocus(ob_display, &w, &r); + if (!w || w == RootWindow(ob_display, ob_screen)) + focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); + } last = focus_client; } |
