@@ -18,7 +18,7 @@ impl UserAppsManager {
1818 pub ( super ) fn init_listing_app_windows ( ) -> Vec < UserAppWindow > {
1919 let mut initial = Vec :: new ( ) ;
2020 let _ = WindowEnumerator :: new ( ) . for_each ( |window| {
21- if is_interactable_and_not_hidden ( & window) {
21+ if is_interactable_window ( & window) {
2222 initial. push ( window. to_serializable ( ) ) ;
2323 }
2424 } ) ;
@@ -29,7 +29,7 @@ impl UserAppsManager {
2929 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) ;
3030 Self :: instance ( )
3131 . interactable_windows
32- . retain ( |w| is_interactable_and_not_hidden ( & Window :: from ( w. hwnd ) ) ) ;
32+ . retain ( |w| is_interactable_window ( & Window :: from ( w. hwnd ) ) ) ;
3333 } ) ;
3434
3535 initial
@@ -40,14 +40,14 @@ impl UserAppsManager {
4040
4141 match event {
4242 WinEvent :: ObjectCreate | WinEvent :: ObjectShow => {
43- if !is_interactable && is_interactable_and_not_hidden ( & window) {
43+ if !is_interactable && is_interactable_window ( & window) {
4444 USER_APPS_MANAGER . add_win ( & window) ;
4545 Self :: send ( UserAppsEvent :: WinAdded ( window. address ( ) ) ) ;
4646 }
4747 }
4848 WinEvent :: ObjectNameChange | WinEvent :: ObjectParentChange => {
4949 let was_interactable = is_interactable;
50- is_interactable = is_interactable_and_not_hidden ( & window) ;
50+ is_interactable = is_interactable_window ( & window) ;
5151 match ( was_interactable, is_interactable) {
5252 ( false , true ) => {
5353 USER_APPS_MANAGER . add_win ( & window) ;
@@ -117,9 +117,9 @@ impl UserAppsManager {
117117/// for the users.
118118///
119119/// As windows properties can change, this should be reevaluated on every change.
120- pub fn is_interactable_and_not_hidden ( window : & Window ) -> bool {
120+ pub fn is_interactable_window ( window : & Window ) -> bool {
121121 // It must be a visible Window and not cloaked
122- if !window. is_visible ( ) || window. is_cloaked ( ) {
122+ if !window. is_window ( ) || !window . is_visible ( ) || window. is_cloaked ( ) {
123123 return false ;
124124 }
125125
0 commit comments