diff options
-rw-r--r-- | sway/ipc.c | 2 | ||||
-rw-r--r-- | sway/resize.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -253,7 +253,7 @@ void ipc_client_handle_command(struct ipc_client *client) { | |||
253 | default: | 253 | default: |
254 | sway_log(L_INFO, "Unknown IPC command type %i", client->current_command); | 254 | sway_log(L_INFO, "Unknown IPC command type %i", client->current_command); |
255 | ipc_client_disconnect(client); | 255 | ipc_client_disconnect(client); |
256 | break; | 256 | return; |
257 | } | 257 | } |
258 | 258 | ||
259 | client->payload_length = 0; | 259 | client->payload_length = 0; |
diff --git a/sway/resize.c b/sway/resize.c index 22d520af..f1b1f4ae 100644 --- a/sway/resize.c +++ b/sway/resize.c | |||
@@ -20,7 +20,7 @@ bool resize_tiled(int amount, bool use_width) { | |||
20 | int lnumber = 0; | 20 | int lnumber = 0; |
21 | int rnumber = 0; | 21 | int rnumber = 0; |
22 | while (parent->parent) { | 22 | while (parent->parent) { |
23 | if (parent->parent->layout == L_HORIZ) { | 23 | if (parent->parent->layout == L_HORIZ && parent->parent->children) { |
24 | for (i = 0; i < parent->parent->children->length; i++) { | 24 | for (i = 0; i < parent->parent->children->length; i++) { |
25 | sibling = parent->parent->children->items[i]; | 25 | sibling = parent->parent->children->items[i]; |
26 | if (sibling->x != focused->x) { | 26 | if (sibling->x != focused->x) { |
@@ -143,7 +143,7 @@ bool resize_tiled(int amount, bool use_width) { | |||
143 | } | 143 | } |
144 | parent = parent->parent; | 144 | parent = parent->parent; |
145 | } | 145 | } |
146 | if (parent == &root_container) { | 146 | if (parent->parent == NULL || parent->parent->children == NULL) { |
147 | return true; | 147 | return true; |
148 | } | 148 | } |
149 | sway_log(L_DEBUG, "Found the proper parent: %p. It has %d b conts, and %d t conts", parent->parent, bnumber, tnumber); | 149 | sway_log(L_DEBUG, "Found the proper parent: %p. It has %d b conts, and %d t conts", parent->parent, bnumber, tnumber); |