summaryrefslogtreecommitdiff
path: root/openbox/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-12-11 19:02:11 -0500
committerDana Jansens <danakj@orodu.net>2009-12-11 19:02:11 -0500
commitacafa38c8ea210b12ed92fc16281b915ab61542c (patch)
treece4c7d2a4a9b3478a4d48af2c54ada06593ed022 /openbox/focus.c
parent2f09e0ce388f63c341cb328d795766e2bd0dc24b (diff)
parent9ba2b04e96449fea5b6bd212aa3d431638754bdd (diff)
Merge branch 'backport' into work
Conflicts: openbox/config.c openbox/event.c openbox/prop.c openbox/prop.h openbox/screen.c openbox/screen.h
Diffstat (limited to 'openbox/focus.c')
-rw-r--r--openbox/focus.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index fc0fd99b..a75c170f 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -129,7 +129,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus,
3. it is not shaded
*/
if ((allow_omnipresent || c->desktop == screen_desktop) &&
- focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, FALSE) &&
+ focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE) &&
!c->shaded &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
@@ -149,7 +149,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus,
a splashscreen or a desktop window (save the desktop as a
backup fallback though)
*/
- if (focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, TRUE) &&
+ if (focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE) &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
{
@@ -183,12 +183,6 @@ ObClient* focus_fallback(gboolean allow_refocus, gboolean allow_pointer,
void focus_nothing(void)
{
- /* Install our own colormap */
- if (focus_client != NULL) {
- screen_install_colormap(focus_client, FALSE);
- screen_install_colormap(NULL, TRUE);
- }
-
/* nothing is focused, update the colormap and _the root property_ */
focus_set_client(NULL);
@@ -280,7 +274,7 @@ static gboolean focus_target_has_siblings(ObClient *ft,
/* check that it's not a helper window to avoid infinite recursion */
if (c != ft && c->type == OB_CLIENT_TYPE_NORMAL &&
focus_valid_target(c, TRUE, iconic_windows, all_desktops,
- FALSE, FALSE))
+ FALSE, FALSE, FALSE))
{
return TRUE;
}
@@ -293,7 +287,8 @@ gboolean focus_valid_target(ObClient *ft,
gboolean iconic_windows,
gboolean all_desktops,
gboolean dock_windows,
- gboolean desktop_windows)
+ gboolean desktop_windows,
+ gboolean user_request)
{
gboolean ok = FALSE;
@@ -332,9 +327,11 @@ gboolean focus_valid_target(ObClient *ft,
!focus_target_has_siblings(ft, iconic_windows, all_desktops))));
/* it's not set to skip the taskbar (but this only applies to normal typed
- windows, and is overridden if the window is modal) */
+ windows, and is overridden if the window is modal or if the user asked
+ for this window to be focused) */
ok = ok && (ft->type != OB_CLIENT_TYPE_NORMAL ||
ft->modal ||
+ user_request ||
!ft->skip_taskbar);
/* it's not going to just send focus off somewhere else (modal window),
@@ -347,7 +344,8 @@ gboolean focus_valid_target(ObClient *ft,
iconic_windows,
all_desktops,
dock_windows,
- desktop_windows));
+ desktop_windows,
+ FALSE));
}
return ok;