File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ impl<H: CefEventHandler> ImplDisplayHandler for DisplayHandlerImpl<H> {
7878 CT_PROGRESS => CursorIcon :: Progress ,
7979 CT_NODROP => CursorIcon :: NoDrop ,
8080 CT_COPY => CursorIcon :: Copy ,
81- CT_NONE => CursorIcon :: Default ,
8281 CT_NOTALLOWED => CursorIcon :: NotAllowed ,
8382 CT_ZOOMIN => CursorIcon :: ZoomIn ,
8483 CT_ZOOMOUT => CursorIcon :: ZoomOut ,
@@ -91,6 +90,10 @@ impl<H: CefEventHandler> ImplDisplayHandler for DisplayHandlerImpl<H> {
9190 CT_DND_COPY => CursorIcon :: Copy ,
9291 CT_DND_LINK => CursorIcon :: Alias ,
9392 CT_NUM_VALUES => CursorIcon :: Default ,
93+ CT_NONE => {
94+ self . event_handler . cursor_change ( crate :: window:: Cursor :: None ) ;
95+ return 1 ; // We handled the cursor change.
96+ }
9497 _ => CursorIcon :: Default ,
9598 } ;
9699
Original file line number Diff line number Diff line change @@ -169,7 +169,12 @@ impl Window {
169169 } ;
170170 custom_cursor. into ( )
171171 }
172+ Cursor :: None => {
173+ self . winit_window . set_cursor_visible ( false ) ;
174+ return ;
175+ }
172176 } ;
177+ self . winit_window . set_cursor_visible ( true ) ;
173178 self . winit_window . set_cursor ( cursor) ;
174179 }
175180
@@ -215,6 +220,7 @@ impl Window {
215220pub ( crate ) enum Cursor {
216221 Icon ( CursorIcon ) ,
217222 Custom ( CustomCursorSource ) ,
223+ None ,
218224}
219225impl From < CursorIcon > for Cursor {
220226 fn from ( icon : CursorIcon ) -> Self {
You can’t perform that action at this time.
0 commit comments