@@ -627,6 +627,7 @@ impl WindowBuilder for WindowBuilderWrapper {
627627 . fullscreen ( config. fullscreen )
628628 . decorations ( config. decorations )
629629 . maximized ( config. maximized )
630+ . always_on_bottom ( config. always_on_bottom )
630631 . always_on_top ( config. always_on_top )
631632 . visible_on_all_workspaces ( config. visible_on_all_workspaces )
632633 . content_protected ( config. content_protected )
@@ -745,6 +746,11 @@ impl WindowBuilder for WindowBuilderWrapper {
745746 self
746747 }
747748
749+ fn always_on_bottom ( mut self , always_on_bottom : bool ) -> Self {
750+ self . inner = self . inner . with_always_on_bottom ( always_on_bottom) ;
751+ self
752+ }
753+
748754 fn always_on_top ( mut self , always_on_top : bool ) -> Self {
749755 self . inner = self . inner . with_always_on_top ( always_on_top) ;
750756 self
@@ -1022,6 +1028,7 @@ pub enum WindowMessage {
10221028 Close ,
10231029 SetDecorations ( bool ) ,
10241030 SetShadow ( bool ) ,
1031+ SetAlwaysOnBottom ( bool ) ,
10251032 SetAlwaysOnTop ( bool ) ,
10261033 SetVisibleOnAllWorkspaces ( bool ) ,
10271034 SetContentProtected ( bool ) ,
@@ -1413,6 +1420,16 @@ impl<T: UserEvent> Dispatch<T> for WryDispatcher<T> {
14131420 )
14141421 }
14151422
1423+ fn set_always_on_bottom ( & self , always_on_bottom : bool ) -> Result < ( ) > {
1424+ send_user_message (
1425+ & self . context ,
1426+ Message :: Window (
1427+ self . window_id ,
1428+ WindowMessage :: SetAlwaysOnBottom ( always_on_bottom) ,
1429+ ) ,
1430+ )
1431+ }
1432+
14161433 fn set_always_on_top ( & self , always_on_top : bool ) -> Result < ( ) > {
14171434 send_user_message (
14181435 & self . context ,
@@ -2289,6 +2306,9 @@ fn handle_user_message<T: UserEvent>(
22892306 #[ cfg( target_os = "macos" ) ]
22902307 window. set_has_shadow ( _enable) ;
22912308 }
2309+ WindowMessage :: SetAlwaysOnBottom ( always_on_bottom) => {
2310+ window. set_always_on_bottom ( always_on_bottom)
2311+ }
22922312 WindowMessage :: SetAlwaysOnTop ( always_on_top) => window. set_always_on_top ( always_on_top) ,
22932313 WindowMessage :: SetVisibleOnAllWorkspaces ( visible_on_all_workspaces) => {
22942314 window. set_visible_on_all_workspaces ( visible_on_all_workspaces)
0 commit comments