]> git.mdlowis.com Git - projs/tide.git/commitdiff
sketch out title stacking logic
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 21 Jun 2019 00:48:24 +0000 (20:48 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 21 Jun 2019 00:48:24 +0000 (20:48 -0400)
src/anvil.c

index 5d10014f88c595ba6a526a74013ea44692c35cd7..5d75b3a212b3151dfbe9c3b38d9f5fdc51cde97e 100644 (file)
@@ -170,7 +170,7 @@ void client_redraw(XConf* x, Client* c) {
 void client_resize(XConf* x, Client* c, int dir) {
     if (!c->prev) return;
     Client* prev = c->prev;
-
+    dir = (!abs(dir) ? -BARHEIGHT(x) : dir);
     int sh = HeightOfScreen(DefaultScreenOfDisplay(x->display));
     int miny = prev->y + BARHEIGHT(x);
     int maxy = (c->next ? c->next->y : sh) - BARHEIGHT(x);
@@ -178,7 +178,6 @@ void client_resize(XConf* x, Client* c, int dir) {
     prev->h = newy - prev->y;
     c->h = (c->next ? (c->next->y - newy) : (sh - newy));
     c->y = newy;
-
     client_reconfig(x, prev);
     client_reconfig(x, c);
 }
@@ -190,7 +189,7 @@ void client_resize(XConf* x, Client* c, int dir) {
 #pragma GCC diagnostic ignored "-Wunused-parameter"
 
 /*
-    * B1 Grow window a little
+    ** B1 Grow window a little
     ** B1 Drag: Resize vertically or  move to column
     * B2: Stack windows with titlebars visible but only one window expanded
     * B3: Maximize in column
@@ -209,10 +208,12 @@ static void xbtnpress(XConf* x, XEvent* e) {
         XDefineCursor(X.display, e->xbutton.window, Move_Cursor);
         StartY = e->xbutton.y;
     } else if (Button2 == e->xbutton.button) {
-        if (e->xbutton.state & (1 << (Button1 + 7)))
+        if (e->xbutton.state & (1 << (Button1 + 7))) {
             puts("kill");
-        else
+        } else {
             puts("grow");
+//            client_grow(x, c);
+        }
     } else if (Button3 == e->xbutton.button) {
         puts("maximize");
     }