diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 8c8dfb3b..79c23274 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -858,6 +858,17 @@ bool container_is_floating(struct sway_container *container) { | |||
858 | return false; | 858 | return false; |
859 | } | 859 | } |
860 | 860 | ||
861 | bool container_is_current_floating(struct sway_container *container) { | ||
862 | if (!container->current.parent && container->current.workspace && | ||
863 | list_find(container->current.workspace->floating, container) != -1) { | ||
864 | return true; | ||
865 | } | ||
866 | if (container->scratchpad) { | ||
867 | return true; | ||
868 | } | ||
869 | return false; | ||
870 | } | ||
871 | |||
861 | void container_get_box(struct sway_container *container, struct wlr_box *box) { | 872 | void container_get_box(struct sway_container *container, struct wlr_box *box) { |
862 | box->x = container->pending.x; | 873 | box->x = container->pending.x; |
863 | box->y = container->pending.y; | 874 | box->y = container->pending.y; |