From 0cfd92ab9e56d8f790c92b83436e981fa46efe20 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 4 Aug 2007 13:29:13 -0400 Subject: don't make omnipresent windows lose focus when changing desktops. this is done by allowing focus_fallback to specify if focus has been lost or not. usually if you're call it, focus is lost, but not always. --- openbox/focus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'openbox/focus.c') diff --git a/openbox/focus.c b/openbox/focus.c index 0dafd799..b056db7e 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -159,7 +159,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, } ObClient* focus_fallback(gboolean allow_refocus, gboolean allow_pointer, - gboolean allow_omnipresent) + gboolean allow_omnipresent, gboolean focus_lost) { ObClient *new; ObClient *old = focus_client; @@ -167,7 +167,8 @@ ObClient* focus_fallback(gboolean allow_refocus, gboolean allow_pointer, /* unfocus any focused clients.. they can be focused by Pointer events and such, and then when we try focus them, we won't get a FocusIn event at all for them. */ - focus_nothing(); + if (focus_lost) + focus_nothing(); new = focus_fallback_target(allow_refocus, allow_pointer, allow_omnipresent, old); -- cgit v1.2.3