diff options
author | Bert <ber.t@gmx.com> | 2011-01-22 23:27:29 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-01-22 23:27:29 +0100 |
commit | 0f714bccda28cd2faa5095fa1ace5d8a113beaec (patch) | |
tree | 3cb8987a175e0267b062137be553ee515c4fe88f /window.c | |
parent | 60a9ed756778478b19ce9d44cfa3ac963aeec175 (diff) | |
download | nsxiv-0f714bccda28cd2faa5095fa1ace5d8a113beaec.tar.zst |
Handle window resize events properly
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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; } |