1
0
Fork 0
forked from wry/wry

wayland: implement xdg_toplevel.wm_capabilities

This commit is contained in:
Julian Orth 2022-06-01 23:32:56 +02:00
parent 6e244a08ab
commit 615d1953aa
4 changed files with 26 additions and 2 deletions

View file

@ -8,7 +8,7 @@ use {
wl_surface::{
xdg_surface::{
xdg_popup::{XdgPopup, XdgPopupError},
xdg_toplevel::XdgToplevel,
xdg_toplevel::{XdgToplevel, WM_CAPABILITIES_SINCE},
},
CommitAction, CommitContext, SurfaceExt, SurfaceRole, WlSurface, WlSurfaceError,
},
@ -217,6 +217,9 @@ impl XdgSurface {
track!(self.surface.client, toplevel);
self.surface.client.add_client_obj(&toplevel)?;
self.ext.set(Some(toplevel.clone()));
if self.base.version >= WM_CAPABILITIES_SINCE {
toplevel.send_wm_capabilities();
}
self.surface.set_toplevel(Some(toplevel));
Ok(())
}