]> git.mdlowis.com Git - proto/anvil.git/commitdiff
removed hooks for expanded mode since they are not necessary
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 18 Mar 2020 18:09:12 +0000 (14:09 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 18 Mar 2020 18:09:12 +0000 (14:09 -0400)
anvil.h
mons.c
mouse.c
tile.c

diff --git a/anvil.h b/anvil.h
index b157eaa28188f3e5a300c19d90fece2a20d4ba9d..f99fff2266cf68d1a7dfd4283595da54c285f3a2 100644 (file)
--- a/anvil.h
+++ b/anvil.h
@@ -59,6 +59,12 @@ Mouse Actions:
         Btn Click 3:
         Btn Click 4:
         Btn Click 5:
+* Monocled mode
+    * Opening a new window switches to max-stacked and splits the subsequent max window
+    * Left click switches to max-stacked
+* Monocled->Stacked Shows focused window max size and titlebars only for everything else
+    * opening a new window splits the expanded one since it is max size
+    *
 
 */
 
@@ -96,8 +102,7 @@ typedef struct Client {
 
 enum {
     TILE_MONOCLE,
-    TILE_STACKED,
-    TILE_EXPAND
+    TILE_STACKED
 } TileMode;
 
 typedef struct Column {
@@ -183,8 +188,6 @@ void mouse_drag(XMotionEvent* ev, Location* loc);
 /* tile.c */
 void monocled_add(Monitor* mon, Column* col, Client* c);
 void monocled_del(Monitor* mon, Column* col, Client* c);
-void expanded_add(Monitor* mon, Column* col, Client* c);
-void expanded_del(Monitor* mon, Column* col, Client* c);
 void stacked_add(Monitor* mon, Column* col, Client* c);
 void stacked_del(Monitor* mon, Column* col, Client* c);
 
diff --git a/mons.c b/mons.c
index b192100a3e133c5d2974f37d0d77f35c06235cfb..22afdb10634abf285f78e6c5eec16f36e100846e 100644 (file)
--- a/mons.c
+++ b/mons.c
@@ -87,10 +87,6 @@ void mons_addclient(Client* c)
         {
             monocled_add(mon, col, c);
         }
-        else if (col->mode == TILE_EXPAND)
-        {
-            expanded_add(mon, col, c);
-        }
         else if (col->mode == TILE_STACKED)
         {
             stacked_add(mon, col, c);
@@ -113,10 +109,6 @@ void mons_delclient(Client* c)
         {
             monocled_del(loc.monitor, loc.column, loc.client);
         }
-        else if (loc.column->mode == TILE_EXPAND)
-        {
-            expanded_del(loc.monitor, loc.column, loc.client);
-        }
         else if (loc.column->mode == TILE_STACKED)
         {
             stacked_del(loc.monitor, loc.column, loc.client);
diff --git a/mouse.c b/mouse.c
index f698378e0749c54e27b02265be79e629c7fee89a..3b1a93e00f2014d12d93939a7fee1a5d9c728c2f 100644 (file)
--- a/mouse.c
+++ b/mouse.c
@@ -28,7 +28,11 @@ static void float_click(XButtonEvent* ev, Location* loc)
 
 static void monocled_click(XButtonEvent* ev, Location* loc)
 {
-    if (ev->button == Button2)
+    if (ev->button == Button1)
+    {
+        puts("switch to expanded");
+    }
+    else if (ev->button == Button2)
     {
         client_close(loc->client);
     }
@@ -54,14 +58,6 @@ static void stacked_click(XButtonEvent* ev, Location* loc)
     }
 }
 
-static void expanded_click(XButtonEvent* ev, Location* loc)
-{
-    if (ev->button == Button2)
-    {
-        client_close(loc->client);
-    }
-}
-
 void mouse_click(XButtonEvent* ev, Location* loc)
 {
     if (!loc->column)
@@ -76,10 +72,6 @@ void mouse_click(XButtonEvent* ev, Location* loc)
     {
         stacked_click(ev, loc);
     }
-    else if (loc->column->mode == TILE_EXPAND)
-    {
-        expanded_click(ev, loc);
-    }
 }
 
 static void float_drag(XMotionEvent* ev, Location* loc)
@@ -108,11 +100,6 @@ static void stacked_drag(XMotionEvent* ev, Location* loc)
     (void)ev, (void)loc;
 }
 
-static void expanded_drag(XMotionEvent* ev, Location* loc)
-{
-    (void)ev, (void)loc;
-}
-
 void mouse_drag(XMotionEvent* ev, Location* loc)
 {
     if (!loc->column)
@@ -127,9 +114,5 @@ void mouse_drag(XMotionEvent* ev, Location* loc)
     {
         stacked_drag(ev, loc);
     }
-    else if (loc->column->mode == TILE_EXPAND)
-    {
-        expanded_drag(ev, loc);
-    }
 }
 
diff --git a/tile.c b/tile.c
index 52963dc5cb48a5a64b1faeba814ebf25cea37f76..e2b2ce6c449e9a62ea3b0337784b5b3e67737a0d 100644 (file)
--- a/tile.c
+++ b/tile.c
@@ -20,23 +20,6 @@ void monocled_del(Monitor* mon, Column* col, Client* c)
     col->clients = delclient(col->clients, c);
 }
 
-void expanded_add(Monitor* mon, Column* col, Client* c)
-{
-    /*
-        * stack all existing clients top to bottom only showing title bars
-        * move+resize new client to fill remaining space or place its title bar at bottom of screen
-    */
-    (void)mon;
-    c->next = col->clients;
-    col->clients = c;
-}
-
-void expanded_del(Monitor* mon, Column* col, Client* c)
-{
-    (void)mon;
-    col->clients = delclient(col->clients, c);
-}
-
 void stacked_add(Monitor* mon, Column* col, Client* c)
 {
     coldims(mon, col, &(c->x), &(c->y), &(c->w), &(c->h));