Skip to content

Commit

Permalink
src: hide mouse pointer if fully dimmed
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvyria committed Oct 11, 2024
1 parent fc2b774 commit 48f9b2c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/dim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,17 @@ impl PointerHandler for DimData {
&mut self,
_conn: &smithay_client_toolkit::reexports::client::Connection,
_qh: &QueueHandle<Self>,
_pointer: &wl_pointer::WlPointer,
pointer: &wl_pointer::WlPointer,
events: &[PointerEvent],
) {
for e in events {
match e.kind {
PointerEventKind::Enter { .. } | PointerEventKind::Leave { .. } => (),
PointerEventKind::Enter { serial } => {
if self.alpha == 1.0 {
pointer.set_cursor(serial, None, 0, 0);
}
},
PointerEventKind::Leave { .. } => {}
_ => {
debug!("Mouse event");
self.exit = true;
Expand Down

0 comments on commit 48f9b2c

Please sign in to comment.