File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -147,20 +147,20 @@ impl App {
147
147
let monitor_width = monitor. size ( ) . width ;
148
148
let width = self . config . window_width . get_points ( monitor_width as f64 ) as u32 ;
149
149
let height = self . config . window_height . get_points ( monitor_height as f64 ) as u32 ;
150
-
151
150
let old_position = gl_window. window ( ) . outer_position ( ) . unwrap_or_default ( ) ;
152
151
let new_position = PhysicalPosition :: new (
153
152
if self . config . center_window_horizontally {
154
- monitor_width / 2 - width / 2
153
+ monitor . position ( ) . x as u32 + monitor_width / 2 - width / 2
155
154
} else {
156
- 0
155
+ monitor . position ( ) . x as u32
157
156
} as i32 ,
158
157
if self . config . center_window_vertically {
159
- monitor_height / 2 - height / 2
158
+ monitor . position ( ) . y as u32 + monitor_height / 2 - height / 2
160
159
} else {
161
- 0
160
+ monitor . position ( ) . y as u32
162
161
} as i32 ,
163
162
) ;
163
+
164
164
if old_position != new_position {
165
165
gl_window. window ( ) . set_outer_position ( new_position) ;
166
166
}
You can’t perform that action at this time.
0 commit comments