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…
This commit is contained in:
Michael Stapelberg 2010-02-20 20:32:43 +01:00
parent 432f06a21e
commit 4fcbb7980e

View File

@ -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)) { if ((size_hints.flags & XCB_SIZE_HINT_P_RESIZE_INC)) {
bool changed = false; 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) { if (client->width_increment != size_hints.width_inc) {
client->width_increment = size_hints.width_inc; client->width_increment = size_hints.width_inc;
changed = true; 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) { if (client->height_increment != size_hints.height_inc) {
client->height_increment = size_hints.height_inc; client->height_increment = size_hints.height_inc;
changed = true; changed = true;