From d02403e6b9df8198232e595878547e5e45e4896d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 10 Jan 2009 10:01:51 +0100 Subject: [PATCH] event: fix ConfigureRequest handling (FS#424) ConfigureRequest are sent with real X windows size, not fake size with border and titlebar. So we need to re-add size of borders and titlebar before calling client_resize(), otherwise we set a X size the client can considers wrong and then we start loopin forever since we do not handle its request to be sized correctly. Signed-off-by: Julien Danjou --- client.c | 1 + event.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/client.c b/client.c index e75bde75..cb8da278 100644 --- a/client.c +++ b/client.c @@ -730,6 +730,7 @@ client_geometry_hints(client_t *c, area_t geometry) } /** Resize client window. + * The sizse given as parameters are with titlebar and borders! * \param c Client to resize. * \param geometry New window geometry. * \param hints Use size hints. diff --git a/event.c b/event.c index ee1035e0..94a141a8 100644 --- a/event.c +++ b/event.c @@ -245,6 +245,10 @@ event_handle_configurerequest(void *data __attribute__ ((unused)), if(ev->value_mask & XCB_CONFIG_WINDOW_HEIGHT) geometry.height = ev->height; + /** Configure request are sent with size relative to real (internal) + * window size, i.e. without titlebars and borders. */ + geometry = titlebar_geometry_add(c->titlebar, c->border, geometry); + if(geometry.x != c->geometry.x || geometry.y != c->geometry.y || geometry.width != c->geometry.width || geometry.height != c->geometry.height) {