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
This commit is contained in:
parent
4acba7227a
commit
39f002e0b1
|
@ -1026,13 +1026,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)) {
|
if ((size_hints.flags & XCB_SIZE_HINT_P_RESIZE_INC)) {
|
||||||
if (size_hints.width_inc > 0)
|
bool changed = false;
|
||||||
client->width_increment = size_hints.width_inc;
|
|
||||||
if (size_hints.height_inc > 0)
|
|
||||||
client->height_increment = size_hints.height_inc;
|
|
||||||
|
|
||||||
resize_client(conn, client);
|
if (size_hints.width_inc > 0)
|
||||||
xcb_flush(conn);
|
if (client->width_increment != size_hints.width_inc) {
|
||||||
|
client->width_increment = size_hints.width_inc;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (size_hints.height_inc > 0)
|
||||||
|
if (client->height_increment != size_hints.height_inc) {
|
||||||
|
client->height_increment = size_hints.height_inc;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
|
resize_client(conn, client);
|
||||||
|
xcb_flush(conn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int base_width = 0, base_height = 0;
|
int base_width = 0, base_height = 0;
|
||||||
|
|
Loading…
Reference in New Issue