tOnly restack windows after moving/resizing - glazier - window management experiments
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4d75d6c1d889c15a32c4172e14ad957aeca86866
 (DIR) parent 46b37f41dcfdaf7c01d12a9a8e37c0c462656e86
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Sat, 26 Oct 2019 14:53:39 +0200
       
       Only restack windows after moving/resizing
       
       Diffstat:
         M glazier.c                           |       7 ++++---
       
       1 file changed, 4 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/glazier.c b/glazier.c
       t@@ -242,7 +242,6 @@ cb_mouse_press(xcb_generic_event_t *ev)
                if (verbose)
                        fprintf(stderr, "%s 0x%08x %d\n", XEV(e), e->event, e->detail);
        
       -        wm_restack(e->child, XCB_STACK_MODE_ABOVE);
        
                cursor.x = e->root_x - wm_get_attribute(e->child, ATTR_X);
                cursor.y = e->root_y - wm_get_attribute(e->child, ATTR_Y);
       t@@ -269,6 +268,7 @@ cb_mouse_press(xcb_generic_event_t *ev)
                        w = wm_get_attribute(e->child, ATTR_W) + move_step;
                        h = wm_get_attribute(e->child, ATTR_H) + move_step;
                        wm_teleport(e->child, x, y, w, h);
       +                wm_restack(e->child, XCB_STACK_MODE_ABOVE);
                        break;
                case 5:
                        x = wm_get_attribute(e->child, ATTR_X) + move_step/2;
       t@@ -276,6 +276,7 @@ cb_mouse_press(xcb_generic_event_t *ev)
                        w = wm_get_attribute(e->child, ATTR_W) - move_step;
                        h = wm_get_attribute(e->child, ATTR_H) - move_step;
                        wm_teleport(e->child, x, y, w, h);
       +                wm_restack(e->child, XCB_STACK_MODE_ABOVE);
                        break;
                default:
                        return 1;
       t@@ -330,7 +331,8 @@ cb_mouse_release(xcb_generic_event_t *ev)
                cursor.x = 0;
                cursor.y = 0;
                cursor.b = 0;
       -        curwid = scrn->root;
       +
       +        wm_restack(curwid, XCB_STACK_MODE_ABOVE);
        
                /* clear last drawn rectangle to avoid leaving artefacts */
                outline(scrn->root, 0, 0, 0, 0, 1);
       t@@ -413,7 +415,6 @@ cb_enter(xcb_generic_event_t *ev)
                        fprintf(stderr, "%s 0x%08x\n", XEV(e), e->event);
        
                wm_set_focus(e->event);
       -        curwid = e->event;
        
                return 0;
        }