From: Michael D. Lowis Date: Wed, 18 Mar 2020 18:09:12 +0000 (-0400) Subject: removed hooks for expanded mode since they are not necessary X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=8ac595eb3b00ad6a5e3f0e24120afd404e72cb1f;p=proto%2Fanvil.git removed hooks for expanded mode since they are not necessary --- diff --git a/anvil.h b/anvil.h index b157eaa..f99fff2 100644 --- 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 b192100..22afdb1 100644 --- 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 f698378..3b1a93e 100644 --- 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 52963dc..e2b2ce6 100644 --- 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));