Closed Bug 1739622 Opened 3 years ago Closed 5 months ago

The PIP window will only resize to smaller size in Linux / Wayland

Categories

(Core :: Widget: Gtk, defect, P3)

Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
121 Branch
Tracking Status
firefox-esr91 --- disabled
firefox-esr102 --- disabled
firefox96 --- disabled
firefox97 --- disabled
firefox98 --- disabled
firefox111 --- disabled
firefox112 --- disabled
firefox113 --- disabled
firefox121 --- verified
firefox122 --- verified
firefox123 --- verified

People

(Reporter: danibodea, Assigned: stransky)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fidefe-MR1-2022])

Attachments

(3 files)

Note

  • When the user opens the browser with wayland window protocol, loads a youtube video and clicks the "Watch in Picture-in-Picture" button and then grabs the vertical or horizontal margins (not the corners) and attempts to enlarge it, he will notice that the PIP window won't resize.

Affected versions

  • Nightly v96.0a1

Affected platforms

  • Ubuntu 21 + wayland

Steps to reproduce

  1. Launch browser with wayland window manager:
    a. Go into the nightly folder.
    b. Right-click and "Open in Terminal".
    c. MOZ_ENABLE_WAYLAND=1
    d. ./firefox
  2. Load https://www.youtube.com/watch?v=SXr8Rb97nIk
  3. Click the "Watch in Picture-in-Picture" button.
  4. Grab a vertical or horizontal margin and enlarge the PIP window.

Expected result

  • The PIP frame is resized correctly.

Actual result

  • The PIP video is not being resized as expected.

Regression range

  • unknown.

Additional notes

  • This issue occurs with "wayland" Window Protocol and not with "xwayland".

Yes, I can reproduce it. We may rework the PIP on Wayland a bit. The PIP is missing shadows and can be only downsized. To enlarge you need to use corners.

Priority: -- → P3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Whiteboard: [fidefe-MR1-2022]

This is still reproductible. Martin, it looks like the Atlassian ticket is inaccessible to me, can you share if there has been updates there?

Flags: needinfo?(stransky)
Summary: The PIP window won't properly resize in wayland (linux) → The PIP window will only resize to smaller size in Linux / Wayland

(In reply to Alexandre LISSY :gerard-majax from comment #4)

This is still reproductible. Martin, it looks like the Atlassian ticket is inaccessible to me, can you share if there has been updates there?

I don't have access to it. Tested latest nightly and the PIP window can be resized by sides, not just corners.

Flags: needinfo?(stransky)
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → WORKSFORME

I do repro the issue on my ubuntu system.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

I can reproduce it too. I wonder why it worked before.

Blocks: snap-wayland

It is possible to increase the size a few pixels at a time by alternating between the horizontal and vertical edges, it stops when the other dimension needs to grow. Single-edge resizing worked before the aspect ratio lock (Bug 1583737) but it just added letterboxing instead of making the other dimension grow.

Blocks: 1583737
Flags: needinfo?(stransky)

Looks like ratio factor setting is broken on Gtk/Wayland. It calls gdk_window_constrain_size() directly from xdg_surface configure without info if window is upsized or downsized. gdk_window_constrain_size() jas internally hard coded increment to 1,1 so it always downsizes the width/height accordingly to scale ratio.

Flags: needinfo?(stransky)
Assignee: nobody → stransky
Status: NEW → ASSIGNED
  • Create corner resizers larger to perform corner resize more comfortable
  • Don't allow to grip West/North edges for resize on Wayland & windows with fixed aspect ratio. We can't resize such windows this way.

Depends on D191757

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/8a99d177d36d
[Wayland] Emulate gdk_window_begin_resize_drag() for edge resize r=emilio
https://hg.mozilla.org/integration/autoland/rev/78ec252ec764
[Linux] Create wider corner resizers for nsWindow::CheckResizerEdge() and restrict edge resize on Wayland r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Regressions: 1863706
Flags: qe-verify+

I can't seem to be able to force-open the browser with wayland window protocol using the following method:

  1. Open the folder of the firefox build on Ubuntu 22.
  2. Right-click / Open in Terminal
  3. type in terminal:
    export MOZ_ENABLE_WAYLAND=1
    and press ENTER
  4. Type in:
    ./firefox
    Expected: Firefox is launched using wayland window protocol.
    Actual: Firefox is launched using x11 window protocol.

This being said, I cannot verify this fix because I do not have a working method to open the browser with wayland.
Martin, can you help me by showing me a method to force-open the browser with wayland window protocol?
Thank you!

Flags: needinfo?(stransky)

(In reply to Daniel Bodea [:danibodea] from comment #16)

I can't seem to be able to force-open the browser with wayland window protocol using the following method:

  1. Open the folder of the firefox build on Ubuntu 22.
  2. Right-click / Open in Terminal
  3. type in terminal:
    export MOZ_ENABLE_WAYLAND=1
    and press ENTER
  4. Type in:
    ./firefox
    Expected: Firefox is launched using wayland window protocol.
    Actual: Firefox is launched using x11 window protocol.

This being said, I cannot verify this fix because I do not have a working method to open the browser with wayland.
Martin, can you help me by showing me a method to force-open the browser with wayland window protocol?
Thank you!

You're perhaps missing Wayland environment. Check if you have Wayland enabled, type on terminal:

env | grep WAYLAND

and you should get something like:

WAYLAND_DISPLAY=wayland-0
Flags: needinfo?(stransky)

Thank you for the information!

I have managed to launch Firefox with Wayland window protocol.
The following behavior can be observed in Nightly v122.0a1 and Beta v121.0 (RC): The bottom and right margins can be grabbed to resize the PiP, but the top and left margins still can't as the cursor does not even change into "its resize form".
Furthermore, the corner-grabbing area may be a little too large because if the user resizes PiP to its smallest size, he will not be able to grab the small margin, only the corners.

As a conclusion, this issue appears to be partially fixed. Martin, what course of action do you recommend for advancing our consideration of this issue?

Thank you!

Flags: needinfo?(stransky)

(In reply to Daniel Bodea [:danibodea] from comment #18)

As a conclusion, this issue appears to be partially fixed. Martin, what course of action do you recommend for advancing our consideration of this issue?

We don't have any other fix available.

Flags: needinfo?(stransky)

Do you suggest we reopen this bug or close it and log another? Thanks!

Flags: needinfo?(stransky)

(In reply to Daniel Bodea [:danibodea] from comment #20)

Do you suggest we reopen this bug or close it and log another? Thanks!

Please file a new one.

Flags: needinfo?(stransky)
Blocks: 1873220
Regressions: 1873220

I have logged the remaining issues from this report into bug 1873220. This one will be closed. Thank you.

Status: RESOLVED → VERIFIED
No longer blocks: 1873220
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: