From 9858599ac12ab9592c08e062b2301e7c24429c81 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 4 Jun 2025 08:26:51 +0300 Subject: Round lock surface size, rather than floor There's no problem with 1 px overflow here, while 1 px underflow shows up as a border. --- src/handlers/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index ffbf2439..8353cd09 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -25,7 +25,7 @@ use smithay::reexports::wayland_server::protocol::wl_data_source::WlDataSource; use smithay::reexports::wayland_server::protocol::wl_output::WlOutput; use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface; use smithay::reexports::wayland_server::Resource; -use smithay::utils::{Logical, Point, Rectangle, Size}; +use smithay::utils::{Logical, Point, Rectangle}; use smithay::wayland::compositor::{get_parent, with_states}; use smithay::wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportNotifier}; use smithay::wayland::drm_lease::{ @@ -470,7 +470,7 @@ delegate_session_lock!(State); pub fn configure_lock_surface(surface: &LockSurface, output: &Output) { surface.with_pending_state(|states| { let size = output_size(output); - states.size = Some(Size::from((size.w as u32, size.h as u32))); + states.size = Some(size.to_i32_round()); }); let scale = output.current_scale(); let transform = output.current_transform(); -- cgit