From 7b408bc3b8f5166a3c725459e0ae7fd93ec8aacb Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 8 Sep 2013 13:39:59 -0400 Subject: Add a strict option to the ToggleShowDesktop action When the strict option is used, normal windows are not able to show themselves while showing the desktop. --- openbox/place.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'openbox/place.c') diff --git a/openbox/place.c b/openbox/place.c index 7d5c8694..aaa1639a 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -406,8 +406,19 @@ static gboolean place_least_overlap(ObClient *c, Rect *head, int *x, int *y, GSList* potential_overlap_clients = NULL; gint n_client_rects = config_dock_hide ? 0 : 1; - /* if we're "showing desktop", ignore all existing windows */ - if (!screen_showing_desktop) { + /* If we're "showing desktop", and going to allow this window to + be shown now, then ignore all existing windows */ + gboolean ignore_windows = FALSE; + switch (screen_show_desktop_mode) { + case SCREEN_SHOW_DESKTOP_NO: + case SCREEN_SHOW_DESKTOP_UNTIL_WINDOW: + break; + case SCREEN_SHOW_DESKTOP_UNTIL_TOGGLE: + ignore_windows = TRUE; + break; + } + + if (!ignore_windows) { GList* it; for (it = client_list; it != NULL; it = g_list_next(it)) { ObClient* maybe_client = (ObClient*)it->data; -- cgit v1.2.3