JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
old code fix
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index 3196192..82bf8b7 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -491,7 +491,7 @@ attachstack(Client *c) {
 
 void
 buttonpress(XEvent *e) {
-       unsigned int i, x, click;
+       unsigned int i, click;
        Arg arg = {0};
        Client *c;
        Monitor *m;
@@ -505,20 +505,7 @@ buttonpress(XEvent *e) {
                focus(NULL);
        }
        if(ev->window == selmon->barwin) {
-               i = x = 0;
-               do
-                       x += TEXTW(tags[i]);
-               while(ev->x >= x && ++i < LENGTH(tags));
-               if(i < LENGTH(tags)) {
-                       click = ClkTagBar;
-                       arg.ui = 1 << i;
-               }
-               else if(ev->x < x + blw)
-                       click = ClkLtSymbol;
-               else if(ev->x > selmon->ww - TEXTW(stext))
-                       click = ClkStatusText;
-               else
-                       click = ClkWinTitle;
+               return;
        }
        else if((c = wintoclient(ev->window))) {
                focus(c);
@@ -761,10 +748,11 @@ detachstack(Client *c) {
                for(i = nextvisible(c->mon->clients); i && i != c; i = nextvisible(i->next))
                        next_sel = i;
                // failing that, find first visible window (besides c)
-               if (!next_sel)
+               if (!next_sel) {
                        for(i = nextvisible(c->mon->clients); i && i == c; i = nextvisible(i->next));
                        if (i != c)
                                next_sel = i;
+               }
                c->mon->sel = next_sel;
        }
        if (prev) {
@@ -1251,6 +1239,7 @@ manage(Window w, XWindowAttributes *wa) {
        XMapWindow(dpy, c->win);
        focus(c);
        if(key_buffering) {
+               // FIXME: try turning off buffering below where we send the virt keypresses
                key_buffering = False;
                grabkeys(); // stop grabbing typing keys
                if(key_buffer_len > 0) {
@@ -1259,6 +1248,7 @@ manage(Window w, XWindowAttributes *wa) {
                        }
                }
                key_buffer_len = 0;
+               // FIXME ie here
        }
 }