]> git.sur5r.net Git - i3/i3/commitdiff
work around clients setting 0xFFFF as resize increments
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 20 Feb 2010 19:32:43 +0000 (20:32 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 20 Feb 2010 19:32:43 +0000 (20:32 +0100)
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

index 0f550835eaaa5dcc073ee89100db40b78f29d013..627744f4cafe817be5af35d1ec2c758a88da44e7 100644 (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)) {
                 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;