Closed Bug 2048501 Opened 2 months ago Closed 1 month ago

When playing two videos simultaneously, with one in Picture-in-Picture mode, switching the other video to fullscreen causes the Windows taskbar to remain visible on top of the fullscreen video.

Categories

(Core :: Widget: Win32, defect)

Firefox 152
Desktop
Windows 11
defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
relnote-firefox --- 154+
firefox154 --- fixed

People

(Reporter: Peter, Assigned: handyman)

References

(Regressed 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0

Steps to reproduce:

  1. Use a single monitor setup.
  2. Open Firefox and start playing two videos in separate tabs (for example, any two YouTube videos).
  3. Enable Picture-in-Picture mode for one of the videos (the tab order does not matter).
  4. Switch the other video to fullscreen by double-clicking the video player (not using Firefox fullscreen mode with F11).
  5. Observe that when the second video enters fullscreen, the Windows taskbar remains visible on top of the video.

Additional notes:

  • If only one video is played in fullscreen without another video in Picture-in-Picture mode, fullscreen works correctly and the Windows taskbar hides as expected.
  • If the Picture-in-Picture window itself is switched to fullscreen, it also works correctly without showing the taskbar.
  • The issue only occurs when one video is in Picture-in-Picture mode and another video is switched to fullscreen.
  • The problem started in Firefox 152.0.
  • I tested Firefox 151.0.4 and the issue does not occur there; the taskbar hides correctly.

Actual results:

When one video is playing in Picture-in-Picture mode and another video is switched to fullscreen, the fullscreen video does not fully cover the screen because the Windows taskbar remains visible on top of it.

Expected results:

When switching a video to fullscreen, it should enter true fullscreen mode and completely cover the screen, hiding the Windows taskbar, even if another video is playing in Picture-in-Picture mode, as it did in Firefox 151.0.4.

The Bugbug bot thinks this bug should belong to the 'Toolkit::Picture-in-Picture' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Picture-in-Picture
Product: Firefox → Toolkit
Attached image screen.png
Component: Picture-in-Picture → General
OS: Unspecified → Windows 11
Product: Toolkit → Firefox
Hardware: Unspecified → Desktop

The taskbar-hiding logic lives in:
• widget/windows/nsWindowTaskbarConcealer.cpp (UpdateAllState, GetWindowState, MarkAsHidingTaskbar / MarkFullscreenWindow / NonRudeHWND + the widget.windows.fullscreen_marking_method pref logic).
• Related: widget/windows/nsWindow.cpp (fullscreen transitions), WinTaskbar.cpp.

Key behavior (simplified):
• It enumerates thread top-level windows in Z-order.
• Per monitor, only the uppermost relevant window gets the "hiding taskbar" mark — and only if it is Gecko-fullscreen.
• PiP windows are relevant top-level windows (they use alwaysontop + Toolkit:PictureInPicture window type). They appear in the list and can be above a main browser window in Z-order.

When a main-window video goes fullscreen while a (non-fullscreen) PiP window exists on the same monitor, the PiP is often the "uppermost relevant" window. The actual fullscreen window therefore does not get marked → taskbar stays visible. This is exactly the class of bug that Widget: Win32 has owned and fixed before.

PiP code (toolkit/components/pictureinpicture/ + the player) is involved as a trigger (alwaysontop window + regression timing), but the broken behavior and the code that needs to be adjusted (better filtering of floating/alwaysontop windows when choosing the "fullscreen representative", special-casing PiP, etc.) are in the widget layer.

Component: General → Widget: Win32
Product: Firefox → Core
Severity: -- → S4
Duplicate of this bug: 2048247
Assignee: nobody → davidp99

Instead of relying on the undocumented Windows behavior giving us the ordering
we like, we can simply rely on the fact that fullscreen should always block the
taskbar.

Pushed by daparks@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2a677748f783 https://hg.mozilla.org/integration/autoland/rev/1214a355f539 Simplify fullscreen detection logic in nsWindowTaskbarConcealer r=win-reviewers,gstoll
Status: UNCONFIRMED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Duplicate of this bug: 2048945
Duplicate of this bug: 2047464

Some PiP special casing was removed in bug 2040926 due to third party causing crashes, this seems to match the timing (uplifted from 153 to 152 back then).

Not directly referencing as a regressor, more of a context for considering uplift potential of this fix — and also a heads up for QA regarding the ESET crash pattern earlier for awareness.

See Also: → 2040926
Duplicate of this bug: 2055201
QA Whiteboard: [qa-ver-opt-c155/b154][qa-triage-done-c155/b154]
Duplicate of this bug: 2058541

Did you want to nominate this for the Fx154 relnotes? If so, set the relnote-firefox flag to "?"

Flags: needinfo?(davidp99)

The bug was a little unusual but it can't hurt to relnote.

Release Note Request (optional, but appreciated)
[Why is this notable]:
When viewing multiple PIP windows, making one fullscreen would put the Windows taskbar in front of it. There may also have been other fullscreen cases that got the taskbar.
[Affects Firefox for Android]:
No
[Suggested wording]:
An issue where the Windows taskbar would appear in front of fullscreened PIP windows has been fixed.
[Links (documentation, blog post, etc)]:
None

relnote-firefox: --- → ?
Flags: needinfo?(davidp99)
Regressions: 2064173
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: