File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -741,6 +741,11 @@ export class Ext extends Ecs.System<ExtEvent> {
741
741
return Rect . Rectangle . from_meta ( meta as Rectangular ) ;
742
742
}
743
743
744
+ monitor_area ( monitor : number ) : Rectangle | null {
745
+ const rect = global . display . get_monitor_geometry ( monitor )
746
+ return rect ? Rect . Rectangle . from_meta ( rect as Rectangular ) : null
747
+ }
748
+
744
749
on_active_workspace_changed ( ) {
745
750
this . register_fn ( ( ) => {
746
751
this . exit_modes ( ) ;
Original file line number Diff line number Diff line change @@ -293,7 +293,10 @@ export class Launcher extends search.Search {
293
293
}
294
294
295
295
open ( ext : Ext ) {
296
- const mon = ext . monitor_work_area ( ext . active_monitor ( ) )
296
+ const active_monitor = ext . active_monitor ( )
297
+ const mon_work_area = ext . monitor_work_area ( active_monitor )
298
+ const mon_area = ext . monitor_area ( active_monitor )
299
+ const mon_width = mon_area ? mon_area . width : mon_work_area . width
297
300
298
301
super . cleanup ( )
299
302
@@ -302,9 +305,9 @@ export class Launcher extends search.Search {
302
305
303
306
super . _open ( global . get_current_time ( ) , false )
304
307
305
- this . dialog . dialogLayout . x = ( mon . width / 2 ) - ( this . dialog . dialogLayout . width / 2 )
308
+ this . dialog . dialogLayout . x = ( mon_width / 2 ) - ( this . dialog . dialogLayout . width / 2 )
306
309
307
- let height = mon . height >= 900 ? mon . height / 2 : mon . height / 3.5
310
+ let height = mon_work_area . height >= 900 ? mon_work_area . height / 2 : mon_work_area . height / 3.5
308
311
this . dialog . dialogLayout . y = height - ( this . dialog . dialogLayout . height / 2 )
309
312
}
310
313
You can’t perform that action at this time.
0 commit comments