summaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c10
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
113static 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
113static void set_fullscreen(struct sway_view *view, bool fullscreen) { 121static 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));