From 243875147237e20fab502b30e086b492eb8afd5d Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 16 Jul 2024 14:00:55 +0300 Subject: [PATCH 1/2] ci: run clippy only on stable --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eb2be0..73b5477 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: run: cargo test --verbose - name: Clippy + if: matrix.toolchain == 'stable' run: cargo clippy -- -D warnings - name: Check documentation From 8d62d0003ee872cf63ee34f8302100a9350402df Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 16 Jul 2024 13:48:24 +0300 Subject: [PATCH 2/2] chore: bump SCTK to 0.19.2 --- Cargo.toml | 6 +++--- examples/clipboard.rs | 39 +++++++++++++++++++++++++++++---------- src/state.rs | 14 ++++++++++++-- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c450f4..ee7cb2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,11 @@ rust-version = "1.65.0" [dependencies] libc = "0.2.149" -sctk = { package = "smithay-client-toolkit", version = "0.18.0", default-features = false, features = ["calloop"] } -wayland-backend = { version = "0.3.0", default_features = false, features = ["client_system"] } +sctk = { package = "smithay-client-toolkit", version = "0.19.2", default-features = false, features = ["calloop"] } +wayland-backend = { version = "0.3.5", default-features = false, features = ["client_system"] } [dev-dependencies] -sctk = { package = "smithay-client-toolkit", version = "0.18.0", default-features = false, features = ["calloop", "xkbcommon"] } +sctk = { package = "smithay-client-toolkit", version = "0.19.2", default-features = false, features = ["calloop", "xkbcommon"] } [features] default = ["dlopen"] diff --git a/examples/clipboard.rs b/examples/clipboard.rs index 583e99d..def5a74 100644 --- a/examples/clipboard.rs +++ b/examples/clipboard.rs @@ -101,20 +101,38 @@ struct SimpleWindow { impl CompositorHandler for SimpleWindow { fn scale_factor_changed( &mut self, - _conn: &Connection, - _qh: &QueueHandle, - _surface: &wl_surface::WlSurface, - _new_factor: i32, + _: &Connection, + _: &QueueHandle, + _: &wl_surface::WlSurface, + _: i32, ) { // Not needed for this example. } + fn surface_enter( + &mut self, + _: &Connection, + _: &QueueHandle, + _: &wl_surface::WlSurface, + _: &wl_output::WlOutput, + ) { + } + + fn surface_leave( + &mut self, + _: &Connection, + _: &QueueHandle, + _: &wl_surface::WlSurface, + _: &wl_output::WlOutput, + ) { + } + fn transform_changed( &mut self, - _conn: &Connection, - _qh: &QueueHandle, - _surface: &wl_surface::WlSurface, - _new_transform: wl_output::Transform, + _: &Connection, + _: &QueueHandle, + _: &wl_surface::WlSurface, + _: wl_output::Transform, ) { // Not needed for this example. } @@ -317,8 +335,9 @@ impl KeyboardHandler for SimpleWindow { _: &Connection, _: &QueueHandle, _: &wl_keyboard::WlKeyboard, - _serial: u32, - _modifiers: Modifiers, + _: u32, + _: Modifiers, + _: u32, ) { } } diff --git a/src/state.rs b/src/state.rs index 69921e9..efa566a 100644 --- a/src/state.rs +++ b/src/state.rs @@ -29,6 +29,7 @@ use sctk::reexports::client::protocol::wl_data_source::WlDataSource; use sctk::reexports::client::protocol::wl_keyboard::WlKeyboard; use sctk::reexports::client::protocol::wl_pointer::WlPointer; use sctk::reexports::client::protocol::wl_seat::WlSeat; +use sctk::reexports::client::protocol::wl_surface::WlSurface; use sctk::reexports::client::{Connection, Dispatch, Proxy, QueueHandle}; use sctk::reexports::protocols::wp::primary_selection::zv1::client::{ zwp_primary_selection_device_v1::ZwpPrimarySelectionDeviceV1, @@ -395,11 +396,20 @@ impl PointerHandler for State { } impl DataDeviceHandler for State { - fn enter(&mut self, _: &Connection, _: &QueueHandle, _: &WlDataDevice) {} + fn enter( + &mut self, + _: &Connection, + _: &QueueHandle, + _: &WlDataDevice, + _: f64, + _: f64, + _: &WlSurface, + ) { + } fn leave(&mut self, _: &Connection, _: &QueueHandle, _: &WlDataDevice) {} - fn motion(&mut self, _: &Connection, _: &QueueHandle, _: &WlDataDevice) {} + fn motion(&mut self, _: &Connection, _: &QueueHandle, _: &WlDataDevice, _: f64, _: f64) {} fn drop_performed(&mut self, _: &Connection, _: &QueueHandle, _: &WlDataDevice) {}