Closed Bug 1786588 Opened 3 years ago Closed 3 years ago

Don't unnecessarily MoveResize windows if they haven't moved or resized.

Categories

(Core :: Widget: Gtk, task)

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

No description provided.

I was looking into bug 1786525 and this caused some useless
notifications which we can avoid.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/220f2e97db7e Don't unnecessarily MoveResize windows if they haven't moved or resize. r=stransky
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

This patch broke window.resizeTo() for me on Plasma Wayland. Confirmed with mozregression.

STR:

  1. Open Firefox. If its window is maximized, restore it to a smaller size.
  2. Manually resize it a bit (move mouse to border until cursor turns to bidirectional arrow, then drag a bit to the side).
  3. Maximize the window.
  4. Open Browser Console and run window.resizeTo(500, 500) - you can change values if you wish.

Expected:
Window should resize to 500px width and 500px height.

Actual result:
Window revert to previous size before it was maximized, the size after the resizing you did in step 2.

Important:
Do not run window.resizeTo or similar in step 2. Step 2 must be a manual resize, don't ask me why.

Should I open a new bug for the regression above?

I'm surprised that ResizeTo on wayland used to work at all? IIRC we can't control the width of the window on Wayland, so just unmaximizing and restoring seems reasonable. But yeah if it used to work please file a bug and I can look.

I switched from X11 to Plasma like 3 months ago and it always worked like that. What programs can't control is window position, not size. mpv for example, I have it configured to resize its window by itself according to video aspect ratio, but regarding position it can't do anthing on Wayland, so I had to create a KWin Window Rule (compositor). The same applies to Firefox, it restores window size from previous session but can't restore position.

So resizeTo works on Firefox Wayland, what doesn't work is moveTo. Even with this patch, resizeTo still works most of the time, the bug is only in a specific circumstance.

I'll fill the bug now.

Regressions: 1792512
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: