aboutsummaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-12 15:17:22 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-12 15:17:22 +0200
commitdfd84f9bf3b9d949412a73bc62a43109b340d395 (patch)
treeebeac582951e2ef574f50018298c4bc928849d64 /event.c
parent7696c89c90c926f6371b1ee3ec1b13dd2414aa40 (diff)
downloaddwm-dfd84f9bf3b9d949412a73bc62a43109b340d395.tar.gz
simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
Diffstat (limited to 'event.c')
-rw-r--r--event.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/event.c b/event.c
index 604420d..1db3d96 100644
--- a/event.c
+++ b/event.c
@@ -37,13 +37,11 @@ void (*handler[LASTEvent]) (XEvent *) = {
[UnmapNotify] = unmapnotify
};
-unsigned int
+void
discard_events(long even_mask)
{
XEvent ev;
- unsigned int n = 0;
- while(XCheckMaskEvent(dpy, even_mask, &ev)) n++;
- return n;
+ while(XCheckMaskEvent(dpy, even_mask, &ev));
}
static void
@@ -53,6 +51,7 @@ buttonpress(XEvent *e)
Client *c;
if((c = getclient(ev->window))) {
+ raise(c);
switch(ev->button) {
default:
break;
@@ -60,7 +59,7 @@ buttonpress(XEvent *e)
mmove(c);
break;
case Button2:
- XLowerWindow(dpy, c->win);
+ lower(c);
break;
case Button3:
mresize(c);
@@ -122,10 +121,8 @@ enternotify(XEvent *e)
if((c = getclient(ev->window)))
focus(c);
- else if(ev->window == root) {
+ else if(ev->window == root)
sel_screen = True;
- /*draw_frames();*/
- }
}
static void
@@ -133,10 +130,8 @@ leavenotify(XEvent *e)
{
XCrossingEvent *ev = &e->xcrossing;
- if((ev->window == root) && !ev->same_screen) {
+ if((ev->window == root) && !ev->same_screen)
sel_screen = True;
- /*draw_frames();*/
- }
}
static void