@@ -1072,6 +1072,7 @@ pub enum WindowMessage {
10721072 IsFullscreen ( Sender < bool > ) ,
10731073 IsMinimized ( Sender < bool > ) ,
10741074 IsMaximized ( Sender < bool > ) ,
1075+ IsFocused ( Sender < bool > ) ,
10751076 IsDecorated ( Sender < bool > ) ,
10761077 IsResizable ( Sender < bool > ) ,
10771078 IsMaximizable ( Sender < bool > ) ,
@@ -1308,6 +1309,10 @@ impl<T: UserEvent> Dispatch<T> for WryDispatcher<T> {
13081309 window_getter ! ( self , WindowMessage :: IsMaximized )
13091310 }
13101311
1312+ fn is_focused ( & self ) -> Result < bool > {
1313+ window_getter ! ( self , WindowMessage :: IsFocused )
1314+ }
1315+
13111316 /// Gets the window’s current decoration state.
13121317 fn is_decorated ( & self ) -> Result < bool > {
13131318 window_getter ! ( self , WindowMessage :: IsDecorated )
@@ -2467,6 +2472,7 @@ fn handle_user_message<T: UserEvent>(
24672472 WindowMessage :: IsFullscreen ( tx) => tx. send ( window. fullscreen ( ) . is_some ( ) ) . unwrap ( ) ,
24682473 WindowMessage :: IsMinimized ( tx) => tx. send ( window. is_minimized ( ) ) . unwrap ( ) ,
24692474 WindowMessage :: IsMaximized ( tx) => tx. send ( window. is_maximized ( ) ) . unwrap ( ) ,
2475+ WindowMessage :: IsFocused ( tx) => tx. send ( window. is_focused ( ) ) . unwrap ( ) ,
24702476 WindowMessage :: IsDecorated ( tx) => tx. send ( window. is_decorated ( ) ) . unwrap ( ) ,
24712477 WindowMessage :: IsResizable ( tx) => tx. send ( window. is_resizable ( ) ) . unwrap ( ) ,
24722478 WindowMessage :: IsMaximizable ( tx) => tx. send ( window. is_maximizable ( ) ) . unwrap ( ) ,
0 commit comments