X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=f1dc41a2bbba91e7cfe8434b3c8b4dee163010e1;hb=c0604ed4692e9e235c6232ba53a00a738d33c7c1;hp=93386d2737c8703f77e27d958634fcd32a617c48;hpb=3855da68fef832dcd4b5eb9275bdb2b5d2f2b01a;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 93386d2..f1dc41a 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -2236,7 +2236,7 @@ bar_extra_update(void) * Attempt to drain stdin, so it doesn't cause the main loop to * call us as fast as it can. */ - fgets(b, sizeof(b), stdin); + while (fgets(b, sizeof(b), stdin) != NULL); if (!bar_enabled) return; @@ -4352,8 +4352,8 @@ max_stack(struct workspace *ws, struct swm_geometry *g) } /* Unmap unwanted windows if not multi-screen. */ - if (!(num_screens > 1 || outputs > 1) && (w != win || - w != parent || w->transient != win->id)) + if (num_screens <= 1 && outputs <= 1 && w != win && + w != parent && w->transient != win->id) unmap_window(w); }