shell: Send on_commit to sticky windows as well
This commit is contained in:
parent
b371a26362
commit
6416299d58
3 changed files with 15 additions and 29 deletions
|
|
@ -1697,6 +1697,18 @@ impl Shell {
|
|||
.refresh(Some(&self.workspace_state));
|
||||
}
|
||||
|
||||
pub fn on_commit(&mut self, surface: &WlSurface) {
|
||||
if let Some(mapped) = self.element_for_surface(surface) {
|
||||
mapped
|
||||
.windows()
|
||||
.find(|(w, _)| w.wl_surface().as_ref() == Some(surface))
|
||||
.unwrap()
|
||||
.0
|
||||
.on_commit();
|
||||
}
|
||||
self.popups.commit(surface);
|
||||
}
|
||||
|
||||
pub fn remap_unfullscreened_window(
|
||||
&mut self,
|
||||
mapped: CosmicMapped,
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ use smithay::{
|
|||
glow::{GlowFrame, GlowRenderer},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
},
|
||||
desktop::{layer_map_for_output, space::SpaceElement, WindowSurfaceType},
|
||||
desktop::{layer_map_for_output, space::SpaceElement},
|
||||
input::Seat,
|
||||
output::Output,
|
||||
reexports::wayland_server::{protocol::wl_surface::WlSurface, Client, Resource},
|
||||
reexports::wayland_server::{Client, Resource},
|
||||
utils::{Buffer as BufferCoords, IsAlive, Logical, Physical, Point, Rectangle, Scale, Size},
|
||||
wayland::{
|
||||
compositor::{add_blocker, Blocker, BlockerState},
|
||||
|
|
@ -360,29 +360,6 @@ impl Workspace {
|
|||
clients
|
||||
}
|
||||
|
||||
pub fn commit(&mut self, surface: &WlSurface) {
|
||||
if let Some(mapped) = self.element_for_surface(surface) {
|
||||
mapped
|
||||
.windows()
|
||||
.find(|(w, _)| w.wl_surface().as_ref() == Some(surface))
|
||||
.unwrap()
|
||||
.0
|
||||
.on_commit();
|
||||
}
|
||||
if let Some(mapped) = self.minimized_windows.iter().find_map(|m| {
|
||||
m.window
|
||||
.has_surface(surface, WindowSurfaceType::TOPLEVEL)
|
||||
.then_some(&m.window)
|
||||
}) {
|
||||
mapped
|
||||
.windows()
|
||||
.find(|(w, _)| w.wl_surface().as_ref() == Some(surface))
|
||||
.unwrap()
|
||||
.0
|
||||
.on_commit();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn output(&self) -> &Output {
|
||||
&self.output
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,14 +242,11 @@ impl CompositorHandler for State {
|
|||
element.clone(),
|
||||
&mut self.common.shell,
|
||||
);
|
||||
if let Some(workspace) = self.common.shell.space_for_mut(&element) {
|
||||
workspace.commit(surface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// and refresh smithays internal state
|
||||
self.common.shell.popups.commit(surface);
|
||||
self.common.shell.on_commit(surface);
|
||||
|
||||
// re-arrange layer-surfaces (commits may change size and positioning)
|
||||
let layer_output = self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue