From: Reginald Kennedy Date: Wed, 1 Feb 2012 20:50:43 +0000 (+0800) Subject: Fix response to applications when windows are not reconfigured as requested. X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=64b9a6facfae53cf9da95488458bb0095b8e4764;p=spectrwm.git Fix response to applications when windows are not reconfigured as requested. This gives applications a chance to redraw the window contents to the actual, unchanged, window geometry. Fixes issues with gvim, emacs, firefox, feh and many other applications. ok marco --- diff --git a/scrotwm.c b/scrotwm.c index 65cd807..b9bed4b 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1643,33 +1643,31 @@ config_win(struct ws_win *win, XConfigureRequestEvent *ev) if (win == NULL) return; + /* send notification of unchanged state. */ + ce.type = ConfigureNotify; + ce.x = X(win); + ce.y = Y(win); + ce.width = WIDTH(win); + ce.height = HEIGHT(win); + ce.override_redirect = False; if (ev == NULL) { /* EWMH */ - ce.type = ConfigureNotify; ce.display = display; ce.event = win->id; ce.window = win->id; - ce.x = X(win); - ce.y = Y(win); - ce.width = WIDTH(win); - ce.height = HEIGHT(win); ce.border_width = border_width; ce.above = None; - ce.override_redirect = False; } else { /* normal */ - ce.type = ConfigureNotify; ce.display = ev->display; ce.event = ev->window; ce.window = ev->window; - ce.x = ev->x; - ce.y = ev->y; - ce.width = ev->width; - ce.height = ev->height; + /* adjust x and y for requested border_width. */ + ce.x += border_width - ev->border_width; + ce.y += border_width - ev->border_width; ce.border_width = ev->border_width; ce.above = ev->above; - ce.override_redirect = False; } DNPRINTF(SWM_D_MISC, "config_win: ewmh: %s, window: 0x%lx, (x,y) w x h: "