[hackers] [dwm] fixed configurerequest according to Jukkas complains

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Mon Feb 19 11:22:47 2007

changeset: 767:074537180053
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Mon Feb 19 11:22:47 2007 +0100
summary: fixed configurerequest according to Jukkas complains

diff -r 42cac13ec21e -r 074537180053 event.c
--- a/event.c Mon Feb 19 11:03:27 2007 +0100
+++ b/event.c Mon Feb 19 11:22:47 2007 +0100
@@ -165,7 +165,6 @@ buttonpress(XEvent *e) {
 
 static void
 configurerequest(XEvent *e) {
- int x, y, w, h;
         Client *c;
         XConfigureRequestEvent *ev = &e->xconfigurerequest;
         XWindowChanges wc;
@@ -175,21 +174,23 @@ configurerequest(XEvent *e) {
                 if(ev->value_mask & CWBorderWidth)
                         c->border = ev->border_width;
                 if(c->isfixed || c->isfloat || (arrange == dofloat)) {
- x = (ev->value_mask & CWX) ? ev->x : c->x;
- y = (ev->value_mask & CWY) ? ev->y : c->y;
- w = (ev->value_mask & CWWidth) ? ev->width : c->w;
- h = (ev->value_mask & CWHeight) ? ev->height : c->h;
+ if(ev->value_mask & CWX)
+ c->x = ev->x;
+ if(ev->value_mask & CWY)
+ c->y = ev->y;
+ if(ev->value_mask & CWWidth)
+ c->w = ev->width;
+ if(ev->value_mask & CWHeight)
+ c->h = ev->height;
                         if((ev->value_mask & (CWX | CWY))
                         && !(ev->value_mask & (CWWidth | CWHeight)))
                         {
- c->x = x;
- c->y = y;
                                 configure(c);
                                 if(isvisible(c))
                                         XMoveWindow(dpy, c->win, c->x, c->y);
                         }
                         else {
- resize(c, x, y, w, h, False);
+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
                                 if(!isvisible(c))
                                         ban(c);
                         }
Received on Mon Feb 19 2007 - 11:22:47 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:27 UTC