diff options
author | emersion <contact@emersion.fr> | 2018-06-30 12:28:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-30 12:28:02 +0100 |
commit | d17ca5d15be2bdeb6541ce0273472ca9a98c9864 (patch) | |
tree | db09a5845214199b2e56aad3dabdb1373f7596d0 /sway/desktop/xdg_shell_v6.c | |
parent | 53c4467573c782b71ab6616e78834b432530f8ed (diff) | |
parent | f42bf0ad4abe185200b68ebce4848b80366cc474 (diff) | |
download | sway-d17ca5d15be2bdeb6541ce0273472ca9a98c9864.tar.xz |
Merge pull request #2171 from atomnuker/master
Revert "Don't unmaximize floating views"
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index eb1cef26..a37a4caf 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -110,6 +110,14 @@ static void set_activated(struct sway_view *view, bool activated) { } } +static void set_tiled(struct sway_view *view, bool tiled) { + if (xdg_shell_v6_view_from_view(view) == NULL) { + return; + } + struct wlr_xdg_surface_v6 *surface = view->wlr_xdg_surface_v6; + wlr_xdg_toplevel_v6_set_maximized(surface, tiled); +} + static void set_fullscreen(struct sway_view *view, bool fullscreen) { if (xdg_shell_v6_view_from_view(view) == NULL) { return; @@ -164,6 +172,7 @@ static const struct sway_view_impl view_impl = { .get_string_prop = get_string_prop, .configure = configure, .set_activated = set_activated, + .set_tiled = set_tiled, .set_fullscreen = set_fullscreen, .wants_floating = wants_floating, .for_each_surface = for_each_surface, @@ -273,7 +282,6 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'", xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); wlr_xdg_surface_v6_ping(xdg_surface); - wlr_xdg_toplevel_v6_set_maximized(xdg_surface, true); struct sway_xdg_shell_v6_view *xdg_shell_v6_view = calloc(1, sizeof(struct sway_xdg_shell_v6_view)); |