shell: Fix x11 stacking order of sticky windows on workspace switch

This commit is contained in:
Victoria Brekenfeld 2023-12-22 15:43:38 +00:00 committed by Victoria Brekenfeld
parent ffd99de7ef
commit c6e6f1b181
2 changed files with 25 additions and 24 deletions

View file

@ -36,17 +36,13 @@ use smithay::{
desktop::{layer_map_for_output, space::SpaceElement},
input::Seat,
output::Output,
reexports::{
wayland_server::{protocol::wl_surface::WlSurface, Client, Resource},
x11rb::errors::ConnectionError,
},
reexports::wayland_server::{protocol::wl_surface::WlSurface, Client, Resource},
utils::{Buffer as BufferCoords, IsAlive, Logical, Physical, Point, Rectangle, Scale, Size},
wayland::{
compositor::{add_blocker, Blocker, BlockerState},
seat::WaylandFocus,
xdg_activation::{XdgActivationState, XdgActivationToken},
},
xwayland::X11Wm,
};
use std::{
collections::{HashMap, HashSet, VecDeque},
@ -771,24 +767,6 @@ impl Workspace {
}
}
pub fn raise_x11_windows(&mut self, xwm: &mut X11Wm) -> Result<(), ConnectionError> {
for window in self
.tiling_layer
.mapped()
.map(|(_, w, _)| w)
.chain(self.floating_layer.space.elements())
{
if let CosmicSurface::X11(surf) = window.active_window() {
xwm.raise_window(&surf)?;
}
}
if let Some(CosmicSurface::X11(ref surf)) = self.fullscreen.as_ref().map(|f| &f.surface) {
xwm.raise_window(surf)?;
}
Ok(())
}
pub fn render<'a, R>(
&self,
renderer: &mut R,