From 1e94dc19ed90479438048babf97e066c2a1cef21 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 25 Aug 2009 23:16:17 +0200 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20call=20resize=5Fclient?= =?utf8?q?=20if=20the=20width/height=20increment=20properties=20did=20not?= =?utf8?q?=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This avoids an endless loop, preventing clients to go to fullscreen --- src/handlers.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index d5fb06c6..601d46f0 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -1013,13 +1013,23 @@ int handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_w } if ((size_hints.flags & XCB_SIZE_HINT_P_RESIZE_INC)) { + bool changed = false; + if (size_hints.width_inc > 0) - client->width_increment = size_hints.width_inc; + if (client->width_increment != size_hints.width_inc) { + client->width_increment = size_hints.width_inc; + changed = true; + } if (size_hints.height_inc > 0) - client->height_increment = size_hints.height_inc; + if (client->height_increment != size_hints.height_inc) { + client->height_increment = size_hints.height_inc; + changed = true; + } - resize_client(conn, client); - xcb_flush(conn); + if (changed) { + resize_client(conn, client); + xcb_flush(conn); + } } int base_width = 0, base_height = 0; -- 2.39.5