From 4fcbb7980e92b51df3e36f261ec664c895ef3531 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 20 Feb 2010 20:32:43 +0100 Subject: [PATCH] work around clients setting 0xFFFF as resize increments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I am not sure if behaviour is specified for this case, but as the workaround is not really a big deal, why bother… --- src/handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index 0f550835..627744f4 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -855,12 +855,12 @@ 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) + if (size_hints.width_inc > 0 && size_hints.width_inc < 0xFFFF) if (client->width_increment != size_hints.width_inc) { client->width_increment = size_hints.width_inc; changed = true; } - if (size_hints.height_inc > 0) + if (size_hints.height_inc > 0 && size_hints.height_inc < 0xFFFF) if (client->height_increment != size_hints.height_inc) { client->height_increment = size_hints.height_inc; changed = true; -- 2.39.5