File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -377,19 +377,15 @@ impl SeatExt for Seat<State> {
377377 }
378378
379379 fn cursor_image_status ( & self ) -> CursorImageStatus {
380- self . user_data ( )
381- . get :: < Mutex < CursorImageStatus > > ( )
382- // Reset the cursor if the surface is no longer alive
383- . map ( |lock| {
384- let mut cursor_status = lock. lock ( ) . unwrap ( ) ;
385- if let CursorImageStatus :: Surface ( ref surface) = * cursor_status {
386- if !surface. alive ( ) {
387- * cursor_status = CursorImageStatus :: default_named ( ) ;
388- }
389- }
390- cursor_status. clone ( )
391- } )
392- . unwrap_or ( CursorImageStatus :: default_named ( ) )
380+ let lock = self . user_data ( ) . get :: < Mutex < CursorImageStatus > > ( ) . unwrap ( ) ;
381+ // Reset the cursor if the surface is no longer alive
382+ let mut cursor_status = lock. lock ( ) . unwrap ( ) ;
383+ if let CursorImageStatus :: Surface ( ref surface) = * cursor_status {
384+ if !surface. alive ( ) {
385+ * cursor_status = CursorImageStatus :: default_named ( ) ;
386+ }
387+ }
388+ cursor_status. clone ( )
393389 }
394390
395391 fn set_cursor_image_status ( & self , status : CursorImageStatus ) {
You can’t perform that action at this time.
0 commit comments