diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-06-27 17:53:13 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-06-30 11:10:47 +0100 |
commit | e0d0e8f840271ab12533cb16c9a7ccba237adcb3 (patch) | |
tree | a81bf679fc25f89cc09516e1920c4496b2e4c2f8 /sway/desktop/xdg_shell_v6.c | |
parent | Merge pull request #2173 from emersion/fix-floating-no-frame-event (diff) | |
download | sway-e0d0e8f840271ab12533cb16c9a7ccba237adcb3.tar.gz sway-e0d0e8f840271ab12533cb16c9a7ccba237adcb3.tar.zst sway-e0d0e8f840271ab12533cb16c9a7ccba237adcb3.zip |
Revert "Don't unmaximize floating views"
This reverts commit 97672295ed50d1d6272876c4a3b6b5607cab05c6.
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) { | |||
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
113 | static void set_tiled(struct sway_view *view, bool tiled) { | ||
114 | if (xdg_shell_v6_view_from_view(view) == NULL) { | ||
115 | return; | ||
116 | } | ||
117 | struct wlr_xdg_surface_v6 *surface = view->wlr_xdg_surface_v6; | ||
118 | wlr_xdg_toplevel_v6_set_maximized(surface, tiled); | ||
119 | } | ||
120 | |||
113 | static void set_fullscreen(struct sway_view *view, bool fullscreen) { | 121 | static void set_fullscreen(struct sway_view *view, bool fullscreen) { |
114 | if (xdg_shell_v6_view_from_view(view) == NULL) { | 122 | if (xdg_shell_v6_view_from_view(view) == NULL) { |
115 | return; | 123 | return; |
@@ -164,6 +172,7 @@ static const struct sway_view_impl view_impl = { | |||
164 | .get_string_prop = get_string_prop, | 172 | .get_string_prop = get_string_prop, |
165 | .configure = configure, | 173 | .configure = configure, |
166 | .set_activated = set_activated, | 174 | .set_activated = set_activated, |
175 | .set_tiled = set_tiled, | ||
167 | .set_fullscreen = set_fullscreen, | 176 | .set_fullscreen = set_fullscreen, |
168 | .wants_floating = wants_floating, | 177 | .wants_floating = wants_floating, |
169 | .for_each_surface = for_each_surface, | 178 | .for_each_surface = for_each_surface, |
@@ -273,7 +282,6 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | |||
273 | wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'", | 282 | wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'", |
274 | xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); | 283 | xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); |
275 | wlr_xdg_surface_v6_ping(xdg_surface); | 284 | wlr_xdg_surface_v6_ping(xdg_surface); |
276 | wlr_xdg_toplevel_v6_set_maximized(xdg_surface, true); | ||
277 | 285 | ||
278 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = | 286 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = |
279 | calloc(1, sizeof(struct sway_xdg_shell_v6_view)); | 287 | calloc(1, sizeof(struct sway_xdg_shell_v6_view)); |