Skip to content

Commit 2380d2b

Browse files
committed
Update smithay, with xwayland shell changes
1 parent 36bf611 commit 2380d2b

File tree

7 files changed

+23
-4
lines changed

7 files changed

+23
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ inherits = "release"
119119
lto = "fat"
120120

121121
[patch."https://github.com/Smithay/smithay.git"]
122-
smithay = {git = "https://github.com/smithay//smithay", rev = "64356be"}
122+
smithay = {git = "https://github.com/smithay//smithay", rev = "f7638e8"}

src/state.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ use smithay::{
9393
virtual_keyboard::VirtualKeyboardManagerState,
9494
xdg_activation::XdgActivationState,
9595
xwayland_keyboard_grab::XWaylandKeyboardGrabState,
96+
xwayland_shell::XWaylandShellState,
9697
},
9798
xwayland::XWaylandClientData,
9899
};
@@ -215,6 +216,7 @@ pub struct Common {
215216
pub xdg_activation_state: XdgActivationState,
216217
pub workspace_state: WorkspaceState<State>,
217218
pub xwayland_state: Option<XWaylandState>,
219+
pub xwayland_shell_state: XWaylandShellState,
218220
}
219221

220222
#[derive(Debug)]
@@ -423,6 +425,7 @@ impl State {
423425
let session_lock_manager_state =
424426
SessionLockManagerState::new::<Self, _>(&dh, client_is_privileged);
425427
XWaylandKeyboardGrabState::new::<Self>(&dh);
428+
let xwayland_shell_state = XWaylandShellState::new::<Self>(&dh);
426429
PointerConstraintsState::new::<Self>(&dh);
427430
PointerGesturesState::new::<Self>(&dh);
428431
TabletManagerState::new::<Self>(&dh);
@@ -529,6 +532,7 @@ impl State {
529532
xdg_activation_state,
530533
workspace_state,
531534
xwayland_state: None,
535+
xwayland_shell_state,
532536
},
533537
backend: BackendData::Unset,
534538
ready: Once::new(),

src/wayland/handlers/compositor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl CompositorHandler for State {
134134
}
135135

136136
fn commit(&mut self, surface: &WlSurface) {
137-
X11Wm::commit_hook::<State>(surface);
137+
X11Wm::commit_hook::<State>(self, surface);
138138
// first load the buffer for various smithay helper functions (which also initializes the RendererSurfaceState)
139139
on_commit_buffer_handler::<Self>(surface);
140140

src/wayland/handlers/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ pub mod workspace;
3838
pub mod xdg_activation;
3939
pub mod xdg_shell;
4040
pub mod xwayland_keyboard_grab;
41+
pub mod xwayland_shell;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: GPL-3.0-only
2+
3+
use crate::state::State;
4+
use smithay::{
5+
delegate_xwayland_shell,
6+
wayland::xwayland_shell::{XWaylandShellHandler, XWaylandShellState},
7+
};
8+
9+
impl XWaylandShellHandler for State {
10+
fn xwayland_shell_state(&mut self) -> &mut XWaylandShellState {
11+
&mut self.common.xwayland_shell_state
12+
}
13+
}
14+
15+
delegate_xwayland_shell!(State);

src/xwayland.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ impl State {
8383

8484
let mut wm = match X11Wm::start_wm(
8585
data.common.event_loop_handle.clone(),
86-
data.common.display_handle.clone(),
8786
x11_socket,
8887
client.clone(),
8988
) {

0 commit comments

Comments
 (0)