Allow custom cursor caching (#3276)
This commit is contained in:
parent
0a7ea61834
commit
2c15de7cf9
26 changed files with 579 additions and 347 deletions
|
|
@ -15,14 +15,13 @@ use sctk::shell::xdg::window::Window as SctkWindow;
|
|||
use sctk::shell::xdg::window::WindowDecorations;
|
||||
use sctk::shell::WaylandSurface;
|
||||
|
||||
use crate::cursor::CustomCursor;
|
||||
use crate::dpi::{LogicalSize, PhysicalPosition, PhysicalSize, Position, Size};
|
||||
use crate::error::{ExternalError, NotSupportedError, OsError as RootOsError};
|
||||
use crate::event::{Ime, WindowEvent};
|
||||
use crate::event_loop::AsyncRequestSerial;
|
||||
use crate::platform_impl::{
|
||||
Fullscreen, MonitorHandle as PlatformMonitorHandle, OsError, PlatformIcon,
|
||||
PlatformSpecificWindowBuilderAttributes as PlatformAttributes,
|
||||
Fullscreen, MonitorHandle as PlatformMonitorHandle, OsError, PlatformCustomCursor,
|
||||
PlatformIcon, PlatformSpecificWindowBuilderAttributes as PlatformAttributes,
|
||||
};
|
||||
use crate::window::{
|
||||
CursorGrabMode, CursorIcon, ImePurpose, ResizeDirection, Theme, UserAttentionType,
|
||||
|
|
@ -508,8 +507,8 @@ impl Window {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_custom_cursor(&self, cursor: CustomCursor) {
|
||||
self.window_state.lock().unwrap().set_custom_cursor(cursor);
|
||||
pub(crate) fn set_custom_cursor(&self, cursor: Arc<PlatformCustomCursor>) {
|
||||
self.window_state.lock().unwrap().set_custom_cursor(&cursor);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue