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
+ *
*/
enum {
TILE_MONOCLE,
- TILE_STACKED,
- TILE_EXPAND
+ TILE_STACKED
} TileMode;
typedef struct Column {
/* 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);
{
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);
{
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);
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);
}
}
}
-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)
{
stacked_click(ev, loc);
}
- else if (loc->column->mode == TILE_EXPAND)
- {
- expanded_click(ev, loc);
- }
}
static void float_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)
{
stacked_drag(ev, loc);
}
- else if (loc->column->mode == TILE_EXPAND)
- {
- expanded_drag(ev, loc);
- }
}
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));