tbetter handling of top/active - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit bdf49b7ee0229aa7c871402aed264789c901ff69
parent 2c1b986edff846e76c1ae7b04a23807055293366
Author: rsc 
Date:   Fri, 13 Aug 2004 14:23:41 +0000

better handling of top/active

Diffstat:
  M src/cmd/rio/event.c                 |      13 ++++++++-----

1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/cmd/rio/event.c b/src/cmd/rio/event.c
t@@ -130,6 +130,12 @@ configurereq(XConfigureRequestEvent *e)
                 if (e->value_mask & CWBorderWidth)
                         c->border = e->border_width;
                 gravitate(c, 0);
+                if (e->value_mask & CWStackMode) {
+                        if (e->detail == Above)
+                                top(c);
+                        else
+                                e->value_mask &= ~CWStackMode;
+                }
                 if (c->parent != c->screen->root && c->window == e->window) {
                         wc.x = c->x-BORDER;
                         wc.y = c->y-BORDER;
t@@ -140,13 +146,10 @@ configurereq(XConfigureRequestEvent *e)
                         wc.stack_mode = e->detail;
                         XConfigureWindow(dpy, c->parent, e->value_mask, &wc);
                         sendconfig(c);
-                }
-                if (e->value_mask & CWStackMode) {
-                        if (wc.stack_mode == Above) {
+                        if (e->value_mask & CWStackMode) {
                                 top(c);
                                 active(c);
-                        }else
-                                e->value_mask &= ~CWStackMode;
+                        }
                 }
         }