From: Michael Stapelberg Date: Sat, 20 Feb 2010 19:32:43 +0000 (+0100) Subject: work around clients setting 0xFFFF as resize increments X-Git-Tag: 3.e~6^2~141 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4fcbb7980e92b51df3e36f261ec664c895ef3531;p=i3%2Fi3 work around clients setting 0xFFFF as resize increments I am not sure if behaviour is specified for this case, but as the workaround is not really a big deal, why bother… --- 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;