Skip to content

Commit

Permalink
Update smithay, with xwayland shell changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 committed May 15, 2024
1 parent dfb3bea commit 1e1215b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
4 changes: 4 additions & 0 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ use smithay::{
virtual_keyboard::VirtualKeyboardManagerState,
xdg_activation::XdgActivationState,
xwayland_keyboard_grab::XWaylandKeyboardGrabState,
xwayland_shell::XWaylandShellState,
},
xwayland::XWaylandClientData,
};
Expand Down Expand Up @@ -219,6 +220,7 @@ pub struct Common {
pub xdg_activation_state: XdgActivationState,
pub workspace_state: WorkspaceState<State>,
pub xwayland_state: Option<XWaylandState>,
pub xwayland_shell_state: XWaylandShellState,
}

#[derive(Debug)]
Expand Down Expand Up @@ -427,6 +429,7 @@ impl State {
let session_lock_manager_state =
SessionLockManagerState::new::<Self, _>(&dh, client_is_privileged);
XWaylandKeyboardGrabState::new::<Self>(&dh);
let xwayland_shell_state = XWaylandShellState::new::<Self>(&dh);
PointerConstraintsState::new::<Self>(&dh);
PointerGesturesState::new::<Self>(&dh);
TabletManagerState::new::<Self>(&dh);
Expand Down Expand Up @@ -533,6 +536,7 @@ impl State {
xdg_activation_state,
workspace_state,
xwayland_state: None,
xwayland_shell_state,
},
backend: BackendData::Unset,
ready: Once::new(),
Expand Down
2 changes: 1 addition & 1 deletion src/wayland/handlers/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl CompositorHandler for State {
}

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

Expand Down
1 change: 1 addition & 0 deletions src/wayland/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ pub mod workspace;
pub mod xdg_activation;
pub mod xdg_shell;
pub mod xwayland_keyboard_grab;
pub mod xwayland_shell;
15 changes: 15 additions & 0 deletions src/wayland/handlers/xwayland_shell.rs
Original file line number Diff line number Diff line change
@@ -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);
1 change: 0 additions & 1 deletion src/xwayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
) {
Expand Down

0 comments on commit 1e1215b

Please sign in to comment.