Skip to content

Commit b687550

Browse files
committed
Reapply "extension/wm: reduce number of resize requests"
This reverts commit 88291d1.
1 parent 4523a9b commit b687550

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ddterm/shell/wm.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,6 @@ export const WindowManager = GObject.registerClass({
405405
}
406406

407407
_move_resize_window(target_rect) {
408-
if (this._client_type === Meta.WindowClientType.WAYLAND)
409-
this.window.move_frame(true, target_rect.x, target_rect.y);
410-
411408
this.window.move_resize_frame(
412409
false,
413410
target_rect.x,
@@ -456,12 +453,14 @@ export const WindowManager = GObject.registerClass({
456453
this.debug?.('Updating window geometry');
457454

458455
const maximize = this.settings.get_boolean('window-maximize');
456+
const target_rect = maximize ? this.geometry.workarea : this.geometry.target_rect;
459457

460-
this._move_resize_window(
461-
maximize ? this.geometry.workarea : this.geometry.target_rect
462-
);
458+
if (this._client_type === Meta.WindowClientType.WAYLAND)
459+
this.window.move_frame(true, target_rect.x, target_rect.y);
463460

464461
if (maximize) {
462+
this._move_resize_window(target_rect);
463+
465464
if (!this._actor.visible && this.show_animation.should_skip)
466465
Main.wm.skipNextEffect(this._actor);
467466

@@ -487,6 +486,8 @@ export const WindowManager = GObject.registerClass({
487486
return;
488487
}
489488

489+
this._move_resize_window(target_rect);
490+
490491
if (!this._actor.visible && this.show_animation.should_skip)
491492
Main.wm.skipNextEffect(this._actor);
492493

0 commit comments

Comments
 (0)