diff --git a/event.c b/event.c index fe605e2ab..a1b48f5bd 100644 --- a/event.c +++ b/event.c @@ -275,6 +275,7 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev) } if(!client_resize(c, geometry, false)) + /* ICCCM 4.1.5 / 4.2.3, if nothing was changed, send an event saying so */ xwindow_configure(c->window, geometry, c->border_width); } else diff --git a/objects/client.c b/objects/client.c index e7d601113..1e0972b53 100644 --- a/objects/client.c +++ b/objects/client.c @@ -732,9 +732,14 @@ client_resize(client_t *c, area_t geometry, bool hints) || c->geometry.width != geometry.width || c->geometry.height != geometry.height) { + bool send_notice = false; screen_t *new_screen = screen_getbycoord(c->screen, geometry.x, geometry.y); + if(c->geometry.width == geometry.width + && c->geometry.height == geometry.height) + send_notice = true; + /* Also store geometry including border */ c->geometry = geometry; @@ -748,6 +753,10 @@ client_resize(client_t *c, area_t geometry, bool hints) XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT, (uint32_t[]) { geometry.x, geometry.y, geometry.width, geometry.height }); + if(send_notice) + /* We are moving without changing the size, see ICCCM 4.2.3 */ + xwindow_configure(c->window, geometry, c->border_width); + client_restore_enterleave_events(); screen_client_moveto(c, new_screen, false);