From 8c1136de23e6e1bfe951fc1e2c9f3c06ba08bda0 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 9 Jun 2011 14:03:56 +0000 Subject: [PATCH] Don't abuse IconicState for unmapped windows. --- scrotwm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index 78f5af7..307e004 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -100,6 +100,7 @@ static const char *cvstag = "$scrotwm$"; #endif #endif +#define SWM_DEBUG /*#define SWM_DEBUG*/ #ifdef SWM_DEBUG #define DPRINTF(x...) do { if (swm_debug) fprintf(stderr, x); } while (0) @@ -1518,7 +1519,7 @@ unmap_window(struct ws_win *win) if (getstate(win->id) == IconicState) return; - set_win_state(win, IconicState); + set_win_state(win, InactiveState); XUnmapWindow(display, win->id); XSetWindowBorder(display, win->id, @@ -5564,7 +5565,7 @@ grab_windows(void) continue; state = getstate(wins[j]); - manage = state == IconicState; + manage = state == IconicState || InactiveState; if (wa.map_state == IsViewable || manage) manage_window(wins[j]); } @@ -5575,7 +5576,7 @@ grab_windows(void) continue; state = getstate(wins[j]); - manage = state == IconicState; + manage = state == IconicState || InactiveState; if (XGetTransientForHint(display, wins[j], &d1) && manage) manage_window(wins[j]); -- 1.7.10.4