File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ impl ClientStateParsed {
6969 let app_name = self
7070 . launch_info
7171 . as_ref ( )
72- . map ( |l| l. cmdline . first ( ) . unwrap ( ) . split ( '/' ) . last ( ) . unwrap ( ) )
72+ . map ( |l| l. cmdline . first ( ) . unwrap ( ) . split ( '/' ) . next_back ( ) . unwrap ( ) )
7373 . unwrap_or ( "unknown" ) ;
7474 let state_file_path = directory
7575 . join ( format ! ( "{app_name}-{}" , nanoid:: nanoid!( ) ) )
Original file line number Diff line number Diff line change @@ -152,22 +152,31 @@ impl InputMethod {
152152 captured : self . captures . get_valid_contents ( ) . contains ( handler) ,
153153 }
154154 }
155-
156155 pub ( super ) fn cull_capture_attempts ( & self ) {
157156 let sent = self
158157 . handler_order
159158 . lock ( )
160159 . iter ( )
161160 . filter_map ( Weak :: upgrade)
162161 . collect :: < Registry < InputHandler > > ( ) ;
163- self . captures . retain ( |handler| {
164- ! handler
162+ self . capture_attempts . retain ( |handler| {
163+ let unresponsive = handler
165164 . spatial
166165 . node ( )
167166 . and_then ( |n| n. get_client ( ) )
168167 . map ( |c| c. unresponsive ( ) )
169- . unwrap_or ( false )
170- && sent. contains ( handler)
168+ . unwrap_or ( false ) ;
169+
170+ let in_sent = sent. contains ( handler) ;
171+
172+ if unresponsive {
173+ println ! ( "Culling capture attempt from unresponsive handler" ) ;
174+ }
175+ if !in_sent {
176+ println ! ( "Culling capture attempt from handler not in sent list" ) ;
177+ }
178+
179+ !unresponsive && in_sent
171180 } ) ;
172181 }
173182}
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ impl MousePointer {
150150 let first_distance = handlers
151151 . first ( )
152152 . map ( |( _, distance) | * distance)
153- . unwrap_or ( std :: f32:: NEG_INFINITY ) ;
153+ . unwrap_or ( f32:: NEG_INFINITY ) ;
154154
155155 self . pointer . set_handler_order (
156156 handlers
You can’t perform that action at this time.
0 commit comments