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 <julien@danjou.info>
This commit is contained in:
parent
61359d0352
commit
d02403e6b9
1
client.c
1
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.
|
||||
|
|
4
event.c
4
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue