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 b296f1a8..69819280 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -108,6 +108,14 @@ static void set_activated(struct sway_view *view, bool activated) {
108 } 108 }
109} 109}
110 110
111static void set_tiled(struct sway_view *view, bool tiled) {
112 if (xdg_shell_v6_view_from_view(view) == NULL) {
113 return;
114 }
115 struct wlr_xdg_surface_v6 *surface = view->wlr_xdg_surface_v6;
116 wlr_xdg_toplevel_v6_set_maximized(surface, tiled);
117}
118
111static void set_fullscreen(struct sway_view *view, bool fullscreen) { 119static void set_fullscreen(struct sway_view *view, bool fullscreen) {
112 if (xdg_shell_v6_view_from_view(view) == NULL) { 120 if (xdg_shell_v6_view_from_view(view) == NULL) {
113 return; 121 return;
@@ -158,6 +166,7 @@ static const struct sway_view_impl view_impl = {
158 .get_string_prop = get_string_prop, 166 .get_string_prop = get_string_prop,
159 .configure = configure, 167 .configure = configure,
160 .set_activated = set_activated, 168 .set_activated = set_activated,
169 .set_tiled = set_tiled,
161 .set_fullscreen = set_fullscreen, 170 .set_fullscreen = set_fullscreen,
162 .wants_floating = wants_floating, 171 .wants_floating = wants_floating,
163 .for_each_surface = for_each_surface, 172 .for_each_surface = for_each_surface,
@@ -284,7 +293,6 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
284 wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'", 293 wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'",
285 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); 294 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
286 wlr_xdg_surface_v6_ping(xdg_surface); 295 wlr_xdg_surface_v6_ping(xdg_surface);
287 wlr_xdg_toplevel_v6_set_maximized(xdg_surface, true);
288 296
289 struct sway_xdg_shell_v6_view *xdg_shell_v6_view = 297 struct sway_xdg_shell_v6_view *xdg_shell_v6_view =
290 calloc(1, sizeof(struct sway_xdg_shell_v6_view)); 298 calloc(1, sizeof(struct sway_xdg_shell_v6_view));