ltk/input/pointer/
enter.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: LGPL-2.1-only
// Copyright (C) 2026 Liberux Labs, S. L. <info@liberux.net>

use crate::app::App;
use crate::event_loop::{ AppData, SurfaceFocus };
use crate::platform::Platform;

impl<A: App, P: Platform> AppData<A, P>
{
	pub( super ) fn on_pointer_enter( &mut self, focus: SurfaceFocus )
	{
		// The cursor shows whatever the previous surface asked for, so the
		// shape is pushed even when it equals the one we last set.
		self.current_cursor_shape = None;
		self.dispatch_cursor_shape( focus );
	}
}