File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed
crates/gitbutler-tauri/src Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -177,20 +177,6 @@ fn main() {
177
177
menu:: handle_event ( handle, & window. clone ( ) , & event)
178
178
} ) ;
179
179
180
- #[ cfg( target_os = "macos" ) ]
181
- use tauri:: LogicalPosition ;
182
- #[ cfg( target_os = "macos" ) ]
183
- use tauri_plugin_trafficlights_positioner:: WindowExt ;
184
- #[ cfg( target_os = "macos" ) ]
185
- // NOTE: Make sure you only call this ONCE per window.
186
- {
187
- if let Some ( window) = tauri_app. get_window ( "main" ) {
188
- #[ cfg( target_os = "macos" ) ]
189
- // NOTE: Make sure you only call this ONCE per window.
190
- window. setup_traffic_lights_inset ( LogicalPosition :: new ( 16.0 , 25.0 ) ) ?;
191
- } ;
192
- }
193
-
194
180
Ok ( ( ) )
195
181
} )
196
182
. plugin ( tauri_plugin_http:: init ( ) )
Original file line number Diff line number Diff line change @@ -320,5 +320,15 @@ pub fn create(
320
320
. disable_drag_drop_handler ( )
321
321
. title_bar_style ( tauri:: TitleBarStyle :: Overlay )
322
322
. build ( ) ?;
323
+
324
+ use tauri:: LogicalPosition ;
325
+ use tauri:: Manager ;
326
+ use tauri_plugin_trafficlights_positioner:: WindowExt ;
327
+ if let Some ( window) = window. get_window ( label) {
328
+ // Note that these lights get reset when the Window label is changed!
329
+ // See https://github.com/tauri-apps/tauri/issues/13044 .
330
+ window. setup_traffic_lights_inset ( LogicalPosition :: new ( 16.0 , 28.0 ) ) ?;
331
+ }
332
+
323
333
Ok ( window)
324
334
}
You can’t perform that action at this time.
0 commit comments