JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
removed client title bar
[dwm.git] / event.c
diff --git a/event.c b/event.c
index a6100e6..a9d2fbb 100644 (file)
--- a/event.c
+++ b/event.c
@@ -1,4 +1,4 @@
-/* (C)opyright MMVII Anselm R. Garbe <garbeam at gmail dot com>
+/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
  * See LICENSE file for license details.
  */
 #include "dwm.h"
@@ -131,8 +131,20 @@ buttonpress(XEvent *e) {
                                return;
                        }
                }
-               if((ev->x < x + bmw) && (ev->button == Button1))
-                       togglemode(NULL);
+               if(ev->x < x + bmw)
+                       switch(ev->button) {
+                       case Button1:
+                               togglemode(NULL);
+                               break;
+                       case Button4:
+                               a.i = 1;
+                               incnmaster(&a);
+                               break;
+                       case Button5:
+                               a.i = -1;
+                               incnmaster(&a);
+                               break;
+                       }
        }
        else if((c = getclient(ev->window))) {
                focus(c);
@@ -184,7 +196,7 @@ configurerequest(XEvent *e) {
                if(c->isfloat) {
                        resize(c, False, TopLeft);
                        if(!isvisible(c))
-                               ban(c);
+                               XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
                }
                else
                        arrange();
@@ -218,7 +230,7 @@ enternotify(XEvent *e) {
 
        if(ev->mode != NotifyNormal || ev->detail == NotifyInferior)
                return;
-       if(((c = getclient(ev->window)) || (c = getctitle(ev->window))) && isvisible(c))
+       if((c = getclient(ev->window)) && isvisible(c))
                focus(c);
        else if(ev->window == root) {
                issel = True;
@@ -235,8 +247,6 @@ expose(XEvent *e) {
        if(ev->count == 0) {
                if(barwin == ev->window)
                        drawstatus();
-               else if((c = getctitle(ev->window)))
-                       drawtitle(c);
        }
 }
 
@@ -319,8 +329,7 @@ propertynotify(XEvent *e) {
                }
                if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
                        updatetitle(c);
-                       resizetitle(c);
-                       drawtitle(c);
+                       drawclient(c);
                }
        }
 }