diff --git a/Cargo.lock b/Cargo.lock index 1f459ae6..6e12c741 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3947,7 +3947,7 @@ checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smithay" version = "0.3.0" -source = "git+https://github.com/smithay//smithay?rev=bf0d4cb#bf0d4cb6a50f671f33083d0ab6a078529583834a" +source = "git+https://github.com/pop-os/smithay?branch=x11_fixes#15dd1675840295062cee4494fa6d49440ec0f04c" dependencies = [ "appendlist", "ash", diff --git a/Cargo.toml b/Cargo.toml index 8bf189dc..548b8db2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,4 +88,4 @@ debug = true lto = "fat" [patch."https://github.com/Smithay/smithay.git"] -smithay = { git = "https://github.com/smithay//smithay", rev = "bf0d4cb" } +smithay = { git = "https://github.com/pop-os/smithay", branch = "x11_fixes" } \ No newline at end of file diff --git a/src/shell/focus/mod.rs b/src/shell/focus/mod.rs index 16e9bdad..653225ab 100644 --- a/src/shell/focus/mod.rs +++ b/src/shell/focus/mod.rs @@ -3,7 +3,6 @@ use crate::{ state::Common, utils::prelude::*, wayland::handlers::xdg_shell::PopupGrabData, - xwayland::XWaylandState, }; use indexmap::IndexSet; use smithay::{ @@ -137,11 +136,7 @@ impl Shell { } } - fn update_active<'a, 'b>( - &mut self, - seats: impl Iterator>, - mut xwm: Option<&'b mut XWaylandState>, - ) { + fn update_active<'a, 'b>(&mut self, seats: impl Iterator>) { // update activate status let focused_windows = seats .flat_map(|seat| { @@ -165,11 +160,6 @@ impl Shell { // TODO: Add self.workspaces.active_workspaces() let workspace = self.workspaces.active_mut(&output); for focused in focused_windows.iter() { - if let CosmicSurface::X11(window) = focused.active_window() { - if let Some(xwm) = xwm.as_mut().and_then(|state| state.xwm.as_mut()) { - let _ = xwm.raise_window(&window); - } - } raise_with_children(&mut workspace.floating_layer, focused); } for window in workspace.mapped() { @@ -212,10 +202,7 @@ impl Common { ) { Shell::set_focus(state, target, active_seat, serial); let seats = state.common.seats().cloned().collect::>(); - state - .common - .shell - .update_active(seats.iter(), state.common.xwayland_state.as_mut()); + state.common.shell.update_active(seats.iter()); } pub fn refresh_focus(state: &mut State) { @@ -359,9 +346,6 @@ impl Common { } let seats = state.common.seats().cloned().collect::>(); - state - .common - .shell - .update_active(seats.iter(), state.common.xwayland_state.as_mut()) + state.common.shell.update_active(seats.iter()) } } diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 9e91795d..a61fbafa 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -1402,19 +1402,6 @@ impl Shell { workspace.fullscreen_request(&mapped.active_window(), None); } - if let CosmicSurface::X11(ref surface) = window { - if let Some(xwm) = state - .common - .xwayland_state - .as_mut() - .and_then(|state| state.xwm.as_mut()) - { - if let Err(err) = xwm.raise_window(surface) { - warn!(?err, "Failed to update Xwayland stacking order."); - } - } - } - Shell::set_focus(state, Some(&KeyboardFocusTarget::from(mapped)), &seat, None); let active_space = state.common.shell.active_space(&output); diff --git a/src/shell/workspace.rs b/src/shell/workspace.rs index bdf0e3fb..2afc092b 100644 --- a/src/shell/workspace.rs +++ b/src/shell/workspace.rs @@ -1072,7 +1072,7 @@ impl Workspace { if let Some(xwm) = xwm_state.and_then(|state| state.xwm.as_mut()) { if let Err(err) = - xwm.update_stacking_order_upwards(window_elements.iter().map(|e| e.id())) + xwm.update_stacking_order_upwards(window_elements.iter().rev().map(|e| e.id())) { warn!( wm_id = ?xwm.id(),