diff --git a/Cargo.lock b/Cargo.lock index 52af46b89..fae2dc536 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4558,7 +4558,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 91f6c0ad1..796a0b74b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -119,4 +119,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 5a0a30c9a..899e0678b 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, }; @@ -215,6 +216,7 @@ pub struct Common { pub xdg_activation_state: XdgActivationState, pub workspace_state: WorkspaceState, pub xwayland_state: Option, + pub xwayland_shell_state: XWaylandShellState, } #[derive(Debug)] @@ -423,6 +425,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); @@ -529,6 +532,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 f588dec8f..8956fdc79 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 6b9c7c2d1..56971a962 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 000000000..a710c7085 --- /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 fe0f3838f..3c5f32ead 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(), ) {