@@ -242,6 +242,7 @@ export class ShellWindow {
242
242
return maximized ;
243
243
}
244
244
245
+
245
246
/**
246
247
* Window is maximized, 0 gapped or smart gapped
247
248
*/
@@ -251,6 +252,15 @@ export class ShellWindow {
251
252
return this . is_maximized ( ) || this . ext . settings . gap_inner ( ) === 0 || this . smart_gapped ;
252
253
}
253
254
255
+ is_single_max_screen ( ) : boolean {
256
+ let monitor_count = this . meta . get_display ( ) . get_n_monitors ( ) ;
257
+ return this . is_max_screen ( ) && monitor_count == 1 ;
258
+ }
259
+
260
+ is_snap_edge ( ) : boolean {
261
+ return this . meta . get_maximized ( ) == Meta . MaximizeFlags . VERTICAL ;
262
+ }
263
+
254
264
is_tilable ( ext : Ext ) : boolean {
255
265
let tile_checks = ( ) => {
256
266
let wm_class = this . meta . get_wm_class ( ) ;
@@ -400,9 +410,8 @@ export class ShellWindow {
400
410
this . restack ( ) ;
401
411
if ( this . ext . settings . active_hint ( ) ) {
402
412
let border = this . border ;
403
- let monitor_count = this . meta . get_display ( ) . get_n_monitors ( ) ;
404
413
if ( ! this . meta . is_fullscreen ( ) &&
405
- ! ( this . is_max_screen ( ) && monitor_count == 1 ) &&
414
+ ( ! this . is_single_max_screen ( ) || this . is_snap_edge ( ) ) &&
406
415
! this . meta . minimized &&
407
416
this . same_workspace ( ) ) {
408
417
if ( this . meta . appears_focused ) {
@@ -427,9 +436,8 @@ export class ShellWindow {
427
436
*/
428
437
restack ( updateState : RESTACK_STATE = RESTACK_STATE . NORMAL ) {
429
438
this . update_border_layout ( ) ;
430
- let monitor_count = this . meta . get_display ( ) . get_n_monitors ( ) ;
431
439
if ( this . meta . is_fullscreen ( ) ||
432
- ( this . is_max_screen ( ) && monitor_count == 1 ) ||
440
+ ( this . is_single_max_screen ( ) && ! this . is_snap_edge ( ) ) ||
433
441
this . meta . minimized ) {
434
442
this . hide_border ( )
435
443
}
@@ -517,7 +525,7 @@ export class ShellWindow {
517
525
let borderSize = this . border_size ;
518
526
519
527
if ( border ) {
520
- if ( ! this . is_max_screen ( ) ) {
528
+ if ( ! ( this . is_max_screen ( ) || this . is_snap_edge ( ) ) ) {
521
529
border . remove_style_class_name ( 'pop-shell-border-maximize' ) ;
522
530
} else {
523
531
borderSize = 0 ;
@@ -559,12 +567,12 @@ export class ShellWindow {
559
567
560
568
if ( workspace === null ) return ;
561
569
562
- /* const screen = workspace.get_work_area_for_monitor(this.meta.get_monitor())
570
+ const screen = workspace . get_work_area_for_monitor ( this . meta . get_monitor ( ) )
563
571
564
572
if ( screen ) {
565
573
width = Math . min ( width , screen . x + screen . width )
566
574
height = Math . min ( height , screen . y + screen . height )
567
- }*/
575
+ }
568
576
569
577
border . set_position ( x , y )
570
578
border . set_size ( width , height )
0 commit comments