@@ -1072,6 +1072,7 @@ pub enum WindowMessage {
1072
1072
IsFullscreen ( Sender < bool > ) ,
1073
1073
IsMinimized ( Sender < bool > ) ,
1074
1074
IsMaximized ( Sender < bool > ) ,
1075
+ IsFocused ( Sender < bool > ) ,
1075
1076
IsDecorated ( Sender < bool > ) ,
1076
1077
IsResizable ( Sender < bool > ) ,
1077
1078
IsMaximizable ( Sender < bool > ) ,
@@ -1308,6 +1309,10 @@ impl<T: UserEvent> Dispatch<T> for WryDispatcher<T> {
1308
1309
window_getter ! ( self , WindowMessage :: IsMaximized )
1309
1310
}
1310
1311
1312
+ fn is_focused ( & self ) -> Result < bool > {
1313
+ window_getter ! ( self , WindowMessage :: IsFocused )
1314
+ }
1315
+
1311
1316
/// Gets the window’s current decoration state.
1312
1317
fn is_decorated ( & self ) -> Result < bool > {
1313
1318
window_getter ! ( self , WindowMessage :: IsDecorated )
@@ -2467,6 +2472,7 @@ fn handle_user_message<T: UserEvent>(
2467
2472
WindowMessage :: IsFullscreen ( tx) => tx. send ( window. fullscreen ( ) . is_some ( ) ) . unwrap ( ) ,
2468
2473
WindowMessage :: IsMinimized ( tx) => tx. send ( window. is_minimized ( ) ) . unwrap ( ) ,
2469
2474
WindowMessage :: IsMaximized ( tx) => tx. send ( window. is_maximized ( ) ) . unwrap ( ) ,
2475
+ WindowMessage :: IsFocused ( tx) => tx. send ( window. is_focused ( ) ) . unwrap ( ) ,
2470
2476
WindowMessage :: IsDecorated ( tx) => tx. send ( window. is_decorated ( ) ) . unwrap ( ) ,
2471
2477
WindowMessage :: IsResizable ( tx) => tx. send ( window. is_resizable ( ) ) . unwrap ( ) ,
2472
2478
WindowMessage :: IsMaximizable ( tx) => tx. send ( window. is_maximizable ( ) ) . unwrap ( ) ,
0 commit comments