diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2022-07-25 12:32:50 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2022-07-25 12:32:50 +0200 |
| commit | 0f821d013cbd36e833b0eeb35a3cdbe8a606a320 (patch) | |
| tree | 1ddd9000b8e509a7722224da1b65abcdbf8d8ea0 | |
| parent | d95644641a9b14d6372fec9ee759517f63ab1cfd (diff) | |
ipc: make get_deco_rect check config->hide_lone_tab
Without this, the `IPC_GET_TREE` ipc call would return false information
about the container's `deco_rect` and `rect` properties if
`hide_edge_borders --i3` was in effect.
| -rw-r--r-- | sway/ipc-json.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 287c158d..e422b24d 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -458,7 +458,9 @@ static void ipc_json_describe_workspace(struct sway_workspace *workspace, static void get_deco_rect(struct sway_container *c, struct wlr_box *deco_rect) { enum sway_container_layout parent_layout = container_parent_layout(c); - bool tab_or_stack = parent_layout == L_TABBED || parent_layout == L_STACKED; + list_t *siblings = container_get_siblings(c); + bool tab_or_stack = (parent_layout == L_TABBED || parent_layout == L_STACKED) + && ((siblings && siblings->length > 1) || !config->hide_lone_tab); if (((!tab_or_stack || container_is_floating(c)) && c->current.border != B_NORMAL) || c->pending.fullscreen_mode != FULLSCREEN_NONE || |
