]> git.mdlowis.com Git - proto/anvil.git/commitdiff
stubbed out some thoughts for better mouse handling
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 16 Mar 2020 20:57:19 +0000 (16:57 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 16 Mar 2020 20:57:19 +0000 (16:57 -0400)
anvil.c
mons.c

diff --git a/anvil.c b/anvil.c
index fe3da5bff7710e724d1fe12f4695a720e06eda7c..3f9ebdee1ab14816253f617e594ee06f52bb3da7 100644 (file)
--- a/anvil.c
+++ b/anvil.c
@@ -30,13 +30,14 @@ static void xbtnpress(XEvent* e)
 {
     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;
@@ -68,6 +69,7 @@ static void xbtnmotion(XEvent* e)
     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)
diff --git a/mons.c b/mons.c
index 2191bdf9707b01d224657ffaabe1197e2a8959a0..6a3c21309aef81a34020a0821b925f20685dd008 100644 (file)
--- a/mons.c
+++ b/mons.c
@@ -61,6 +61,20 @@ void mons_addclient(Client* c)
     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 */