diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-06 11:56:50 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-06 11:56:50 +0400 |
| commit | 180d07aab9b96a6b6794561a42ce1a7ad246d989 (patch) | |
| tree | d1299cc56ec9daf2e4b01449e8abbf472a07b694 /src | |
| parent | f929370cf5f02872472d75eb127613769ae266e6 (diff) | |
| download | niri-180d07aab9b96a6b6794561a42ce1a7ad246d989.tar.gz niri-180d07aab9b96a6b6794561a42ce1a7ad246d989.tar.bz2 niri-180d07aab9b96a6b6794561a42ce1a7ad246d989.zip | |
Redraw on cursor or DnD surface commits
Diffstat (limited to 'src')
| -rw-r--r-- | src/handlers/compositor.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs index 5f7bf71d..503868bd 100644 --- a/src/handlers/compositor.rs +++ b/src/handlers/compositor.rs @@ -2,6 +2,7 @@ use std::collections::hash_map::Entry; use smithay::backend::renderer::utils::{on_commit_buffer_handler, with_renderer_surface_state}; use smithay::desktop::find_popup_root_surface; +use smithay::input::pointer::CursorImageStatus; use smithay::reexports::calloop::Interest; use smithay::reexports::wayland_server::protocol::wl_buffer; use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface; @@ -148,6 +149,18 @@ impl CompositorHandler for State { // This might be a layer-shell surface. self.layer_shell_handle_commit(surface); + + // This might be a cursor surface. + if matches!(&self.niri.cursor_image, CursorImageStatus::Surface(s) if s == surface) { + // FIXME: granular redraws for cursors. + self.niri.queue_redraw_all(); + } + + // This might be a DnD icon surface. + if self.niri.dnd_icon.as_ref() == Some(surface) { + // FIXME: granular redraws for cursors. + self.niri.queue_redraw_all(); + } } } |
