From: Michael Stapelberg Date: Tue, 25 Aug 2009 21:16:17 +0000 (+0200) Subject: Bugfix: Don’t call resize_client if the width/height increment properties did not... X-Git-Tag: 3.d-bf1~47 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1e94dc19ed90479438048babf97e066c2a1cef21;p=i3%2Fi3 Bugfix: Don’t call resize_client if the width/height increment properties did not change This avoids an endless loop, preventing clients to go to fullscreen --- 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;