diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-10-29 10:43:10 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-10-29 10:43:10 -0400 |
commit | c01248cf17b0556145d973449d0b12cad0b96a8c (patch) | |
tree | 8b76fcdbf82ee92ef19504d4a9c0e3abc43f8e1c /rootston/xdg_shell_v6.c | |
parent | ce72a687ce3b88b69b0d319800d2f466205a15f7 (diff) | |
parent | 50e86a0efa43fa72bd7d8c2dfc2d124052f74823 (diff) |
Merge branch 'master' into feature/xwm-rewrite
Diffstat (limited to 'rootston/xdg_shell_v6.c')
-rw-r--r-- | rootston/xdg_shell_v6.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index 85871144..4f284851 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -29,6 +29,21 @@ static void resize(struct roots_view *view, uint32_t width, uint32_t height) { assert(view->type == ROOTS_XDG_SHELL_V6_VIEW); struct wlr_xdg_surface_v6 *surf = view->xdg_surface_v6; if (surf->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL) { + struct wlr_xdg_toplevel_v6_state *state = + &surf->toplevel_state->current; + if (width < state->min_width) { + width = state->min_width; + } else if (state->max_width > 0 && + width < state->max_width) { + width = state->max_width; + } + if (height < state->min_height) { + height = state->min_height; + } else if (state->max_height > 0 && + height < state->max_height) { + height = state->max_height; + } + wlr_xdg_toplevel_v6_set_size(surf, width, height); } } |