From 0f714bccda28cd2faa5095fa1ace5d8a113beaec Mon Sep 17 00:00:00 2001 From: Bert Date: Sat, 22 Jan 2011 23:27:29 +0100 Subject: Handle window resize events properly --- window.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index fc6a264..752f045 100644 --- a/window.c +++ b/window.c @@ -102,19 +102,20 @@ void win_set_title(win_t *win, const char *title) { XSetIconName(win->env.dpy, win->xwin, title); } -int win_configure(win_t *win, XConfigureEvent *cev) { +int win_configure(win_t *win, XConfigureEvent *c) { int changed; if (!win) return 0; - changed = win->x != cev->x || win->y != cev->y || - win->w != cev->width || win->h != cev->height; - win->x = cev->x; - win->y = cev->y; - win->w = cev->width; - win->h = cev->height; - win->bw = cev->border_width; + changed = win->w != c->width || win->h != c->height; + + win->x = c->x; + win->y = c->y; + win->w = c->width; + win->h = c->height; + win->bw = c->border_width; + return changed; } -- cgit v1.2.3