diff options
author | 2018-05-26 20:04:59 +1000 | |
---|---|---|
committer | 2018-06-01 23:14:58 +1000 | |
commit | 4371c746e4d46c866ba4cdac2b3fba63a8de762e (patch) | |
tree | 732a2ec87028d8b3b79a6d75044d31a23f2f4f2a /sway/desktop/xdg_shell.c | |
parent | Remove container_self_or_parent_floating (diff) | |
download | sway-4371c746e4d46c866ba4cdac2b3fba63a8de762e.tar.gz sway-4371c746e4d46c866ba4cdac2b3fba63a8de762e.tar.zst sway-4371c746e4d46c866ba4cdac2b3fba63a8de762e.zip |
Implement wants_floating for xdg_shell and xdg_shell_v6
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 412488b3..ae6945c2 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -128,8 +128,10 @@ static void set_fullscreen(struct sway_view *view, bool fullscreen) { | |||
128 | } | 128 | } |
129 | 129 | ||
130 | static bool wants_floating(struct sway_view *view) { | 130 | static bool wants_floating(struct sway_view *view) { |
131 | // TODO | 131 | struct wlr_xdg_toplevel_state *state = |
132 | return false; | 132 | &view->wlr_xdg_surface->toplevel->current; |
133 | return state->min_width == state->max_width | ||
134 | && state->min_height == state->max_height; | ||
133 | } | 135 | } |
134 | 136 | ||
135 | static void for_each_surface(struct sway_view *view, | 137 | static void for_each_surface(struct sway_view *view, |