@@ -331,15 +331,15 @@ fn wrapped_main() -> ! {
331
331
)
332
332
. expect ( "couldn't initiate UX op" ) ;
333
333
}
334
- Some ( Opcode :: StopProgress ) => msg_scalar_unpack ! ( msg, t0, t1, t2, t3, {
334
+ Some ( Opcode :: StopProgress ) => msg_blocking_scalar_unpack ! ( msg, t0, t1, t2, t3, {
335
335
let token = [ t0 as u32 , t1 as u32 , t2 as u32 , t3 as u32 ] ;
336
336
if token != token_lock. unwrap_or( default_nonce) {
337
337
log:: warn!( "Attempt to access modals without a mutex lock. Ignoring." ) ;
338
338
continue ;
339
339
}
340
340
send_message(
341
341
renderer_cid,
342
- Message :: new_scalar( Opcode :: FinishProgress . to_usize( ) . unwrap( ) , 0 , 0 , 0 , 0 ) ,
342
+ Message :: new_scalar( Opcode :: FinishProgress . to_usize( ) . unwrap( ) , msg . sender as usize , 0 , 0 , 0 ) ,
343
343
)
344
344
. expect( "couldn't update progress bar" ) ;
345
345
} ) ,
@@ -401,10 +401,6 @@ fn wrapped_main() -> ! {
401
401
log:: warn!( "Attempt to access modals without a mutex lock. Ignoring." ) ;
402
402
continue ;
403
403
}
404
- if let Some ( sender) = dynamic_notification_listener. take( ) {
405
- // unblock the listener with no key hit response
406
- xous:: return_scalar2( sender, 0 , 0 , ) . unwrap( ) ;
407
- }
408
404
send_message(
409
405
renderer_cid,
410
406
Message :: new_scalar(
@@ -700,9 +696,11 @@ fn wrapped_main() -> ! {
700
696
}
701
697
}
702
698
}
703
- Some ( Opcode :: FinishProgress ) => {
699
+ Some ( Opcode :: FinishProgress ) => msg_scalar_unpack ! ( msg , caller , _ , _ , _ , {
704
700
renderer_modal. gam. relinquish_focus( ) . unwrap( ) ;
705
701
op = RendererState :: None ;
702
+ // unblock the caller, which was forwarded on as the first argument
703
+ xous:: return_scalar( caller as Sender , 0 ) . ok( ) ;
706
704
token_lock = next_lock( & mut work_queue) ;
707
705
/*
708
706
if work_queue.len() > 0 {
@@ -712,7 +710,7 @@ fn wrapped_main() -> ! {
712
710
} else {
713
711
token_lock = None;
714
712
}*/
715
- }
713
+ } ) ,
716
714
Some ( Opcode :: DoUpdateDynamicNotification ) => match op {
717
715
RendererState :: RunDynamicNotification ( config) => {
718
716
//log::set_max_level(log::LevelFilter::Trace);
@@ -747,6 +745,10 @@ fn wrapped_main() -> ! {
747
745
Some ( Opcode :: DoCloseDynamicNotification ) => {
748
746
renderer_modal. gam . relinquish_focus ( ) . unwrap ( ) ;
749
747
op = RendererState :: None ;
748
+ if let Some ( sender) = dynamic_notification_listener. take ( ) {
749
+ // unblock the listener with no key hit response
750
+ xous:: return_scalar2 ( sender, 0 , 0 , ) . unwrap ( ) ;
751
+ }
750
752
token_lock = next_lock ( & mut work_queue) ;
751
753
} ,
752
754
Some ( Opcode :: HandleDynamicNotificationKeyhit ) => msg_scalar_unpack ! ( msg, k, _, _, _, {
0 commit comments