From 47d107edb5069176265852fac96ea0eedbec8d34 Mon Sep 17 00:00:00 2001 From: Bert Date: Mon, 17 Jan 2011 19:50:46 +0100 Subject: React to ConfigureNotify --- window.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'window.c') diff --git a/window.c b/window.c index f9852f9..b9a3440 100644 --- a/window.c +++ b/window.c @@ -84,3 +84,19 @@ void win_close(win_t *win) { XFreeGC(dpy, gc); XCloseDisplay(dpy); } + +int win_configure(win_t *win, XConfigureEvent *cev) { + int changed; + + if (win == NULL) + 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; + return changed; +} -- cgit v1.2.3