File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -593,20 +593,20 @@ class DDTermAppWindow extends Gtk.ApplicationWindow {
593593 if ( ! rect )
594594 return ;
595595
596- let [ target_x , target_y , target_w , target_h ] = rect ;
596+ let [ , , target_w , target_h ] = rect ;
597597
598598 if ( this . display_config . layout_mode !== LayoutMode . LOGICAL ) {
599- const display = this . get_display ( ) ;
600- const target_monitor = display . get_monitor_at_point ( target_x , target_y ) ;
599+ const scale = this . extension_dbus . TargetMonitorScale ;
601600
602- target_w = Math . floor ( target_w / target_monitor . scale_factor ) ;
603- target_h = Math . floor ( target_h / target_monitor . scale_factor ) ;
601+ if ( ! scale )
602+ return ;
603+
604+ target_w = Math . floor ( target_w / scale ) ;
605+ target_h = Math . floor ( target_h / scale ) ;
604606 }
605607
606608 this . resize ( target_w , target_h ) ;
607-
608- if ( this . window )
609- this . window . resize ( target_w , target_h ) ;
609+ this . window ?. resize ( target_w , target_h ) ;
610610 }
611611
612612 update_tab_label_width ( ) {
You can’t perform that action at this time.
0 commit comments