misc fixes to xdg-toplevel-decoration
This commit is contained in:
parent
c215e8a3e1
commit
7b3eb70501
4
dwl.c
4
dwl.c
|
@ -759,6 +759,8 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||||
if (c->surface.xdg->initial_commit) {
|
if (c->surface.xdg->initial_commit) {
|
||||||
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
||||||
wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, 0, 0);
|
wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, 0, 0);
|
||||||
|
if (c->decoration)
|
||||||
|
requestdecorationmode(&c->set_decoration_mode, c->decoration);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,6 +1054,7 @@ void
|
||||||
destroydecoration(struct wl_listener *listener, void *data)
|
destroydecoration(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
Client *c = wl_container_of(listener, c, destroy_decoration);
|
Client *c = wl_container_of(listener, c, destroy_decoration);
|
||||||
|
c->decoration = NULL;
|
||||||
|
|
||||||
wl_list_remove(&c->destroy_decoration.link);
|
wl_list_remove(&c->destroy_decoration.link);
|
||||||
wl_list_remove(&c->set_decoration_mode.link);
|
wl_list_remove(&c->set_decoration_mode.link);
|
||||||
|
@ -1929,6 +1932,7 @@ void
|
||||||
requestdecorationmode(struct wl_listener *listener, void *data)
|
requestdecorationmode(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
Client *c = wl_container_of(listener, c, set_decoration_mode);
|
Client *c = wl_container_of(listener, c, set_decoration_mode);
|
||||||
|
if (c->surface.xdg->initialized)
|
||||||
wlr_xdg_toplevel_decoration_v1_set_mode(c->decoration,
|
wlr_xdg_toplevel_decoration_v1_set_mode(c->decoration,
|
||||||
WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue