{
XButtonEvent* ev = &(e->xbutton);
Client* c = client_get(e->xbutton.window);
+ X.start_x = ev->x_root;
+ X.start_y = ev->y_root;
if (c && (ev->window == c->frame))
{
+// client_btnclick(c, ev->button, ev->x, ev->y);
if (ev->button == Button1)
{
client_raise(c);
- X.start_x = ev->x_root;
- X.start_y = ev->y_root;
if (ev->y > (TITLE_HEIGHT + BORDER_WIDTH))
{
X.mode = M_RESIZE;
Client* c = client_get(ev->window);
if (c && (ev->window == c->frame))
{
+// client_btnmove(c, ev->button, ev->x, ev->y);
if (PRESSED(ev->state, Button1))
{
if (X.mode != M_RESIZE)
else
{
Column* col = pickcol(mon->cspace->columns, ptrx - mon->x);
+ /*
+ Client* c = find_max(col->clients);
+ if (c)
+ {
+ c->next = col->clients;
+ col->clients = c;
+ }
+ else
+ {
+ shrink the window;
+ fill the gap with the new window;
+ }
+ */
+
c->next = col->clients;
col->clients = c;
/* TODO: tile the window approriately */