diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 18:52:38 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 18:52:38 -0400 |
commit | 3e61718053a7e2cdd94c64f5613c6bdf28e35c8e (patch) | |
tree | 4cceb8836dbc34317c8e530aec373fd6241db466 /sway/tree | |
parent | Merge pull request #1731 from acrisci/ipc-window-events (diff) | |
download | sway-3e61718053a7e2cdd94c64f5613c6bdf28e35c8e.tar.gz sway-3e61718053a7e2cdd94c64f5613c6bdf28e35c8e.tar.zst sway-3e61718053a7e2cdd94c64f5613c6bdf28e35c8e.zip |
try to fix focus-inactive
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 753f333c..b47a8364 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -51,12 +51,18 @@ const char *container_type_to_str(enum sway_container_type type) { | |||
51 | } | 51 | } |
52 | 52 | ||
53 | void container_create_notify(struct sway_container *container) { | 53 | void container_create_notify(struct sway_container *container) { |
54 | if (container->type != C_VIEW || container->type != C_CONTAINER) { | ||
55 | return; | ||
56 | } | ||
54 | // TODO send ipc event type based on the container type | 57 | // TODO send ipc event type based on the container type |
55 | wl_signal_emit(&root_container.sway_root->events.new_container, container); | 58 | wl_signal_emit(&root_container.sway_root->events.new_container, container); |
56 | ipc_event_window(container, "new"); | 59 | ipc_event_window(container, "new"); |
57 | } | 60 | } |
58 | 61 | ||
59 | static void container_close_notify(struct sway_container *container) { | 62 | static void container_close_notify(struct sway_container *container) { |
63 | if (container == NULL) { | ||
64 | return; | ||
65 | } | ||
60 | // TODO send ipc event type based on the container type | 66 | // TODO send ipc event type based on the container type |
61 | ipc_event_window(container, "close"); | 67 | ipc_event_window(container, "close"); |
62 | } | 68 | } |
@@ -522,8 +528,8 @@ static bool find_child_func(struct sway_container *con, void *data) { | |||
522 | 528 | ||
523 | bool container_has_child(struct sway_container *con, | 529 | bool container_has_child(struct sway_container *con, |
524 | struct sway_container *child) { | 530 | struct sway_container *child) { |
525 | if (child == NULL || child->type == C_VIEW || | 531 | if (con == NULL || con->type == C_VIEW || |
526 | child->children->length == 0) { | 532 | con->children->length == 0) { |
527 | return false; | 533 | return false; |
528 | } | 534 | } |
529 | return container_find(con, find_child_func, child); | 535 | return container_find(con, find_child_func, child); |