summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-22 23:27:29 +0100
committerBert <ber.t@gmx.com>2011-01-22 23:27:29 +0100
commit0f714bccda28cd2faa5095fa1ace5d8a113beaec (patch)
tree3cb8987a175e0267b062137be553ee515c4fe88f /window.c
parent60a9ed756778478b19ce9d44cfa3ac963aeec175 (diff)
downloadnsxiv-0f714bccda28cd2faa5095fa1ace5d8a113beaec.tar.zst
Handle window resize events properly
Diffstat (limited to 'window.c')
-rw-r--r--window.c17
1 files changed, 9 insertions, 8 deletions
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;
}