JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
removed unnecessary crap
[dwm.git] / event.c
diff --git a/event.c b/event.c
index 93007df..5ff6b91 100644 (file)
--- a/event.c
+++ b/event.c
@@ -51,7 +51,7 @@ buttonpress(XEvent *e)
        Client *c;
 
        if((c = getclient(ev->window))) {
-               raise(c);
+               craise(c);
                switch(ev->button) {
                default:
                        break;
@@ -126,7 +126,7 @@ enternotify(XEvent *e)
        if((c = getclient(ev->window)))
                focus(c);
        else if(ev->window == root)
-               sel_screen = True;
+               issel = True;
 }
 
 static void
@@ -135,7 +135,7 @@ leavenotify(XEvent *e)
        XCrossingEvent *ev = &e->xcrossing;
 
        if((ev->window == root) && !ev->same_screen)
-               sel_screen = True;
+               issel = True;
 }
 
 static void
@@ -147,8 +147,6 @@ expose(XEvent *e)
        if(ev->count == 0) {
                if((c = gettitle(ev->window)))
                        draw_client(c);
-               else if(ev->window == barwin)
-                       draw_bar();
        }
 }
 
@@ -186,11 +184,11 @@ propertynotify(XEvent *e)
        if(ev->state == PropertyDelete)
                return; /* ignore */
 
-       if(ev->atom == wm_atom[WMProtocols]) {
-               c->proto = win_proto(c->win);
-               return;
-       }
        if((c = getclient(ev->window))) {
+               if(ev->atom == wm_atom[WMProtocols]) {
+                       c->proto = win_proto(c->win);
+                       return;
+               }
                switch (ev->atom) {
                        default: break;
                        case XA_WM_TRANSIENT_FOR:
@@ -203,10 +201,7 @@ propertynotify(XEvent *e)
                }
                if(ev->atom == XA_WM_NAME || ev->atom == net_atom[NetWMName]) {
                        update_name(c);
-                       if(c == stack)
-                               draw_bar();
-                       else
-                               draw_client(c);
+                       draw_client(c);
                }
        }
 }