@@ -70,6 +70,12 @@ pub enum Action<T> {
7070 ///
7171 /// - **Web / Wayland:** Unsupported.
7272 GainFocus ,
73+ /// Change whether or not the window will always be on top of other windows.
74+ ///
75+ /// ## Platform-specific
76+ ///
77+ /// - **Web / Wayland:** Unsupported.
78+ ChangeAlwaysOnTop ( bool ) ,
7379}
7480
7581impl < T > Action < T > {
@@ -85,8 +91,8 @@ impl<T> Action<T> {
8591 Self :: Close => Action :: Close ,
8692 Self :: Drag => Action :: Drag ,
8793 Self :: Resize { width, height } => Action :: Resize { width, height } ,
88- Self :: Maximize ( bool ) => Action :: Maximize ( bool ) ,
89- Self :: Minimize ( bool ) => Action :: Minimize ( bool ) ,
94+ Self :: Maximize ( maximized ) => Action :: Maximize ( maximized ) ,
95+ Self :: Minimize ( minimized ) => Action :: Minimize ( minimized ) ,
9096 Self :: Move { x, y } => Action :: Move { x, y } ,
9197 Self :: ChangeMode ( mode) => Action :: ChangeMode ( mode) ,
9298 Self :: FetchMode ( o) => Action :: FetchMode ( Box :: new ( move |s| f ( o ( s) ) ) ) ,
@@ -96,6 +102,9 @@ impl<T> Action<T> {
96102 Action :: RequestUserAttention ( attention_type)
97103 }
98104 Self :: GainFocus => Action :: GainFocus ,
105+ Self :: ChangeAlwaysOnTop ( on_top) => {
106+ Action :: ChangeAlwaysOnTop ( on_top)
107+ }
99108 }
100109 }
101110}
@@ -109,8 +118,12 @@ impl<T> fmt::Debug for Action<T> {
109118 f,
110119 "Action::Resize {{ widget: {width}, height: {height} }}"
111120 ) ,
112- Self :: Maximize ( value) => write ! ( f, "Action::Maximize({value})" ) ,
113- Self :: Minimize ( value) => write ! ( f, "Action::Minimize({value}" ) ,
121+ Self :: Maximize ( maximized) => {
122+ write ! ( f, "Action::Maximize({maximized})" )
123+ }
124+ Self :: Minimize ( minimized) => {
125+ write ! ( f, "Action::Minimize({minimized}" )
126+ }
114127 Self :: Move { x, y } => {
115128 write ! ( f, "Action::Move {{ x: {x}, y: {y} }}" )
116129 }
@@ -122,6 +135,9 @@ impl<T> fmt::Debug for Action<T> {
122135 write ! ( f, "Action::RequestUserAttention" )
123136 }
124137 Self :: GainFocus => write ! ( f, "Action::GainFocus" ) ,
138+ Self :: ChangeAlwaysOnTop ( on_top) => {
139+ write ! ( f, "Action::AlwaysOnTop({on_top})" )
140+ }
125141 }
126142 }
127143}
0 commit comments