aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-15 11:15:09 -0400
committerGitHub <noreply@github.com>2018-09-15 11:15:09 -0400
commit9f985f1f1cabf65b1c8349d9320a3031f959ec5a (patch)
treea05b996b9f513e008f8879fab5604462853e156b /sway/tree
parentb47f4f5fd4b8dc3852c5958f3e6ec70de448ff2d (diff)
parent34dbbb1314af16e388c7517aec6427baa00fb179 (diff)
downloadsway-9f985f1f1cabf65b1c8349d9320a3031f959ec5a.tar.xz
Merge pull request #2634 from ianyfan/ipc
ipc: add focus information to root node
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/node.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/tree/node.c b/sway/tree/node.c
index 74661c1a..dcab1c9b 100644
--- a/sway/tree/node.c
+++ b/sway/tree/node.c
@@ -74,8 +74,10 @@ void node_get_box(struct sway_node *node, struct wlr_box *box) {
struct sway_output *node_get_output(struct sway_node *node) {
switch (node->type) {
- case N_CONTAINER:
- return node->sway_container->workspace->output;
+ case N_CONTAINER: {
+ struct sway_workspace *ws = node->sway_container->workspace;
+ return ws ? ws->output : NULL;
+ }
case N_WORKSPACE:
return node->sway_workspace->output;
case N_OUTPUT: