diff --git a/Cargo.lock b/Cargo.lock index 2d836845..200bb6a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4556,7 +4556,7 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smithay" version = "0.3.0" -source = "git+https://github.com/smithay//smithay?rev=64356be#64356be949f2ad5f70f601cd10255eafed2ce2ce" +source = "git+https://github.com/smithay//smithay?rev=f7638e8#f7638e860347e8d4abb8c10f7ebaece9dac38de5" dependencies = [ "appendlist", "ash", diff --git a/Cargo.toml b/Cargo.toml index 17180f49..5bb237b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,4 +118,4 @@ inherits = "release" lto = "fat" [patch."https://github.com/Smithay/smithay.git"] -smithay = {git = "https://github.com/smithay//smithay", rev = "64356be"} +smithay = {git = "https://github.com/smithay//smithay", rev = "f7638e8"} diff --git a/src/state.rs b/src/state.rs index 42ab4c11..0a6321cf 100644 --- a/src/state.rs +++ b/src/state.rs @@ -93,6 +93,7 @@ use smithay::{ virtual_keyboard::VirtualKeyboardManagerState, xdg_activation::XdgActivationState, xwayland_keyboard_grab::XWaylandKeyboardGrabState, + xwayland_shell::XWaylandShellState, }, xwayland::XWaylandClientData, }; @@ -219,6 +220,7 @@ pub struct Common { pub xdg_activation_state: XdgActivationState, pub workspace_state: WorkspaceState, pub xwayland_state: Option, + pub xwayland_shell_state: XWaylandShellState, } #[derive(Debug)] @@ -427,6 +429,7 @@ impl State { let session_lock_manager_state = SessionLockManagerState::new::(&dh, client_is_privileged); XWaylandKeyboardGrabState::new::(&dh); + let xwayland_shell_state = XWaylandShellState::new::(&dh); PointerConstraintsState::new::(&dh); PointerGesturesState::new::(&dh); TabletManagerState::new::(&dh); @@ -533,6 +536,7 @@ impl State { xdg_activation_state, workspace_state, xwayland_state: None, + xwayland_shell_state, }, backend: BackendData::Unset, ready: Once::new(), diff --git a/src/wayland/handlers/compositor.rs b/src/wayland/handlers/compositor.rs index f588dec8..8956fdc7 100644 --- a/src/wayland/handlers/compositor.rs +++ b/src/wayland/handlers/compositor.rs @@ -134,7 +134,7 @@ impl CompositorHandler for State { } fn commit(&mut self, surface: &WlSurface) { - X11Wm::commit_hook::(surface); + X11Wm::commit_hook::(self, surface); // first load the buffer for various smithay helper functions (which also initializes the RendererSurfaceState) on_commit_buffer_handler::(surface); diff --git a/src/wayland/handlers/mod.rs b/src/wayland/handlers/mod.rs index 6b9c7c2d..56971a96 100644 --- a/src/wayland/handlers/mod.rs +++ b/src/wayland/handlers/mod.rs @@ -38,3 +38,4 @@ pub mod workspace; pub mod xdg_activation; pub mod xdg_shell; pub mod xwayland_keyboard_grab; +pub mod xwayland_shell; diff --git a/src/wayland/handlers/xwayland_shell.rs b/src/wayland/handlers/xwayland_shell.rs new file mode 100644 index 00000000..a710c708 --- /dev/null +++ b/src/wayland/handlers/xwayland_shell.rs @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-3.0-only + +use crate::state::State; +use smithay::{ + delegate_xwayland_shell, + wayland::xwayland_shell::{XWaylandShellHandler, XWaylandShellState}, +}; + +impl XWaylandShellHandler for State { + fn xwayland_shell_state(&mut self) -> &mut XWaylandShellState { + &mut self.common.xwayland_shell_state + } +} + +delegate_xwayland_shell!(State); diff --git a/src/xwayland.rs b/src/xwayland.rs index fe0f3838..3c5f32ea 100644 --- a/src/xwayland.rs +++ b/src/xwayland.rs @@ -83,7 +83,6 @@ impl State { let mut wm = match X11Wm::start_wm( data.common.event_loop_handle.clone(), - data.common.display_handle.clone(), x11_socket, client.clone(), ) {