From 5dc88da3bda3f8626d1f43b5cd1db10950c5cb76 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Thu, 12 Jan 2017 13:19:01 +0300 Subject: [PATCH] Reply on configurerequest even if geometry is the same (#1388) Bug was introduced by baaff93a7349a. Fixes: https://github.com/awesomeWM/awesome/issues/1340 Fixes: https://github.com/awesomeWM/awesome/issues/1369 --- event.c | 5 ++--- objects/client.c | 9 ++++++++- objects/client.h | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/event.c b/event.c index 3bf513c7..40e33d74 100644 --- a/event.c +++ b/event.c @@ -395,9 +395,8 @@ event_handle_configurerequest(xcb_configure_request_event_t *ev) geometry.y += diff_y; } - if(!client_resize(c, geometry, false)) - /* ICCCM 4.1.5 / 4.2.3, if nothing was changed, send an event saying so */ - client_send_configure(c); + c->got_configure_request = true; + client_resize(c, geometry, false); } else if (xembed_getbywin(&globalconf.embedded, ev->window)) { diff --git a/objects/client.c b/objects/client.c index 309d021e..ec4ab424 100644 --- a/objects/client.c +++ b/objects/client.c @@ -1210,8 +1210,14 @@ client_geometry_refresh(void) /* Is there anything to do? */ if (AREA_EQUAL(geometry, c->x11_frame_geometry) - && AREA_EQUAL(real_geometry, c->x11_client_geometry)) + && AREA_EQUAL(real_geometry, c->x11_client_geometry)) { + if (c->got_configure_request) { + /* ICCCM 4.1.5 / 4.2.3, if nothing was changed, send an event saying so */ + client_send_configure(c); + c->got_configure_request = false; + } continue; + } if (!ignored_enterleave) { client_ignore_enterleave_events(); @@ -1230,6 +1236,7 @@ client_geometry_refresh(void) /* ICCCM 4.2.3 says something else, but Java always needs this... */ client_send_configure(c); + c->got_configure_request = false; } if (ignored_enterleave) client_restore_enterleave_events(); diff --git a/objects/client.h b/objects/client.h index e2dcfc8e..760fb13c 100644 --- a/objects/client.h +++ b/objects/client.h @@ -64,6 +64,8 @@ struct client_t /** Old window geometry currently configured in X11 */ area_t x11_client_geometry; area_t x11_frame_geometry; + /** Got a configure request and have to call client_send_configure() if its ignored? */ + bool got_configure_request; /** Startup ID */ char *startup_id; /** True if the client is sticky */