Skip to content

Commit

Permalink
send maximized if tiled isn't supported (XDG shell)
Browse files Browse the repository at this point in the history
wlroots doesn't do it automatically anymore

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4409
  • Loading branch information
sevz17 committed Nov 1, 2023
1 parent 892a4d3 commit e5e74ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,12 @@ client_set_tiled(Client *c, uint32_t edges)
if (client_is_x11(c))
return;
#endif
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
if (wl_resource_get_version(c->surface.xdg->resource)
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
} else {
wlr_xdg_toplevel_set_maximized(c->surface.xdg->toplevel, edges != 0);
}
}

static inline void
Expand Down

0 comments on commit e5e74ac

Please sign in to comment.