summaryrefslogtreecommitdiff
path: root/openbox/place.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2013-09-08 13:39:59 -0400
committerDana Jansens <danakj@orodu.net>2013-09-09 10:47:43 -0400
commit7b408bc3b8f5166a3c725459e0ae7fd93ec8aacb (patch)
tree1dcfddd23141a043a049b05b7027555ab12ee6b3 /openbox/place.c
parentadcb7a78d9e58c2670b0b046f418a39ec52afb5e (diff)
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.
Diffstat (limited to 'openbox/place.c')
-rw-r--r--openbox/place.c15
1 files changed, 13 insertions, 2 deletions
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;