From 2d76672188abfb1942340bbe55e24e58066feb75 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Fri, 4 Feb 2022 20:53:18 +0100 Subject: [PATCH] deps: update smithay/smithay-egui --- Cargo.lock | 11 ++++++----- Cargo.toml | 9 +++------ src/shell/grabs.rs | 12 +++++++++--- src/shell/mod.rs | 6 +++--- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac5246e1..f7442a64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -683,9 +683,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.116" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" +checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" [[package]] name = "libdbus-sys" @@ -1209,6 +1209,7 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "smithay" version = "0.3.0" +source = "git+https://github.com/Smithay/smithay.git?rev=5da3a629#5da3a629290fef745abca58272cf27044acc03e6" dependencies = [ "appendlist", "bitflags", @@ -1268,7 +1269,7 @@ dependencies = [ [[package]] name = "smithay-egui" version = "0.1.0" -source = "git+https://github.com/Smithay/smithay-egui.git?rev=cdff1795#cdff17953e837fb090445db0ca8a85f6d932b79b" +source = "git+https://github.com/Smithay/smithay-egui.git?rev=cdca17da#cdca17da3278751fa1fae9d3805c47012d7ca418" dependencies = [ "cgmath", "egui", @@ -1383,9 +1384,9 @@ checksum = "4ccbe8381883510b6a2d8f1e32905bddd178c11caef8083086d0c0c9ab0ac281" [[package]] name = "udev" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3193363f52bb34c6708ac2ffedcb5f7e5874f0329ef68e1315f27d8d768eb568" +checksum = "1c960764f7e816eed851a96c364745d37f9fe71a2e7dba79fbd40104530b5dd0" dependencies = [ "libc", "libudev-sys", diff --git a/Cargo.toml b/Cargo.toml index feecfff7..d196d366 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,18 +21,15 @@ xcursor = "0.3.3" [dependencies.smithay] version = "0.3" git = "https://github.com/Smithay/smithay.git" -rev = "ab89bda5" +rev = "5da3a629" default-features = false features = ["backend_drm", "backend_gbm", "backend_egl", "backend_libinput", "backend_session_logind", "backend_udev", "backend_winit", "backend_x11", "desktop", "use_system_lib", "renderer_gl", "wayland_frontend", "slog-stdlog"] [dependencies.smithay-egui] git = "https://github.com/Smithay/smithay-egui.git" -rev = "cdff1795" +rev = "cdca17da" optional = true [features] default = [] -debug = ["egui", "smithay-egui"] - -[patch."https://github.com/Smithay/smithay"] -smithay = { path = "../../tavern/smithay" } \ No newline at end of file +debug = ["egui", "smithay-egui"] \ No newline at end of file diff --git a/src/shell/grabs.rs b/src/shell/grabs.rs index de2337c0..c0797b19 100644 --- a/src/shell/grabs.rs +++ b/src/shell/grabs.rs @@ -30,12 +30,15 @@ pub struct MoveSurfaceGrab { impl PointerGrab for MoveSurfaceGrab { fn motion( &mut self, - _handle: &mut PointerInnerHandle<'_>, + handle: &mut PointerInnerHandle<'_>, location: Point, _focus: Option<(wl_surface::WlSurface, Point)>, - _serial: Serial, - _time: u32, + serial: Serial, + time: u32, ) { + // While the grab is active, no client has pointer focus + handle.motion(location, None, serial, time); + let delta = location - self.start_data.location; let new_location = self.initial_window_location.to_f64() + delta; self.window @@ -175,6 +178,9 @@ impl PointerGrab for ResizeSurfaceGrab { serial: Serial, time: u32, ) { + // While the grab is active, no client has pointer focus + handle.motion(location, None, serial, time); + // It is impossible to get `min_size` and `max_size` of dead toplevel, so we return early. if !self.window.toplevel().alive() | self.window.toplevel().get_surface().is_none() { handle.unset_grab(serial, time); diff --git a/src/shell/mod.rs b/src/shell/mod.rs index e6213b03..e57c7f6d 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -150,7 +150,7 @@ pub fn init_shell(display: &mut Display) -> ShellStates { initial_window_location, ); - pointer.set_grab(grab, serial); + pointer.set_grab(grab, serial, 0); } } @@ -177,7 +177,7 @@ pub fn init_shell(display: &mut Display) -> ShellStates { let grab = grabs::ResizeSurfaceGrab::new(start_data, window, edges, geometry); - pointer.set_grab(grab, serial); + pointer.set_grab(grab, serial, 0); } } XdgRequest::AckConfigure { @@ -254,7 +254,7 @@ pub fn init_shell(display: &mut Display) -> ShellStates { grab.ungrab(PopupUngrabStrategy::All); return; } - pointer.set_grab(PopupPointerGrab::new(&grab), serial); + pointer.set_grab(PopupPointerGrab::new(&grab), serial, 0); } } }