shell: Fix x11 stacking order of sticky windows on workspace switch
This commit is contained in:
parent
ffd99de7ef
commit
c6e6f1b181
2 changed files with 25 additions and 24 deletions
|
|
@ -1151,7 +1151,30 @@ impl Shell {
|
|||
.as_mut()
|
||||
.and_then(|state| state.xwm.as_mut())
|
||||
{
|
||||
let _ = set.workspaces[idx].raise_x11_windows(xwm);
|
||||
{
|
||||
for window in set.workspaces[set.active]
|
||||
.tiling_layer
|
||||
.mapped()
|
||||
.map(|(_, w, _)| w)
|
||||
.chain(set.workspaces[set.active].floating_layer.space.elements())
|
||||
{
|
||||
if let CosmicSurface::X11(surf) = window.active_window() {
|
||||
let _ = xwm.raise_window(&surf);
|
||||
}
|
||||
}
|
||||
for window in set.sticky_layer.space.elements() {
|
||||
if let CosmicSurface::X11(surf) = window.active_window() {
|
||||
let _ = xwm.raise_window(&surf);
|
||||
}
|
||||
}
|
||||
if let Some(CosmicSurface::X11(ref surf)) = set.workspaces[set.active]
|
||||
.fullscreen
|
||||
.as_ref()
|
||||
.map(|f| &f.surface)
|
||||
{
|
||||
let _ = xwm.raise_window(surf);
|
||||
}
|
||||
}
|
||||
for surface in &self.override_redirect_windows {
|
||||
let _ = xwm.raise_window(surface);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue