Bug 499222 - Maximized window title stuck after fullscreen-ing video
Summary: Maximized window title stuck after fullscreen-ing video
Status: CLOSED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-01-28 01:15 UTC by Jakob Petsovits
Modified: 2025-03-05 14:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
KWin Support Information (7.04 KB, text/plain)
2025-01-29 04:33 UTC, Jakob Petsovits
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2025-01-28 01:15:20 UTC
SUMMARY
When playing a video element in a browser window, after pressing its fullscreen button to maximize the video and then restoring it back to regular size, the window title stops updating. Navigating to a new page, or switching to a different tab, won't update the text in the titlebar.

STEPS TO REPRODUCE
1. Open a new Firefox window. Private Browsing if you like. Chromium is also affected in the same way, you can use either for testing.
2. Open https://store.steampowered.com/app/512900/Streets_of_Rogue/ in the first tab.
3. Create a second tab and visit https://develop.kde.org/hig/ in that one.
4. Back in the first tab, press the fullscreen button on the bottom right of the video element. Enjoy the game trailer, or don't.
5. In the fullscreen video view, pause the video and press the fullscreen button again to restore it to regular size.
6. Switch to the second tab.

OBSERVED RESULT
Window title still says "Save 80% on Streets of Rogue on Steam". Window title will never update again until closed.

EXPECTED RESULT
Window title says "KDE Human Interface Guidelines". Window title will update again anytime I view a different web page.

SOFTWARE/OS VERSIONS
KWin git commit: eea6f816590686e081c4cb858f466f3f562fec0e (on master)
Operating System: Arch Linux 
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.1
Kernel Version: 6.12.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Intel® UHD Graphics 620
Firefox: v134.0 with "Window Protocol" being "wayland", as per about:support

ADDITIONAL INFORMATION
Not sure when I first noticed this happening, probably sometime in December 2024 on Plasma 6.3 master? Finally figured out the pattern today! :)
Comment 1 Jakob Petsovits 2025-01-28 01:22:32 UTC
Oh yeah, in order to experience this bug, you may need to manually enable the system title bar.

In Firefox:
1. Right-click anywhere on the toolbar, then click "Customize toolbar..."
2. Check "Title Bar" on the bottom right.

In Chromium:
1. Right-click in the free space on the tab bar / CSD title bar, then click "Use system title bar and borders".
Comment 2 Vlad Zahorodnii 2025-01-28 09:40:40 UTC
I followed the provided steps but I cannot reproduce the bug
Comment 3 cwo 2025-01-29 00:17:01 UTC
Hm, I can't reproduce it either, but I have noticed my Firefox windows getting their title stuck occasionally as well (on stock Firefox, Plasma master).
Comment 4 Jakob Petsovits 2025-01-29 01:52:58 UTC
Let me rebuild latest KWin master and retest.
Comment 5 Jakob Petsovits 2025-01-29 04:33:43 UTC
Created attachment 177782 [details]
KWin Support Information

Still reproducible on today's KWin master, git commit 6e95287fb5f1934b7de3d29f224dd2166fb9d63b. Maybe the problem is with another component - I also updated kwayland as a build requirement, but only a handful of other repos are fully up to date.

I'll try separately updating my (Arch) base packages and the rest of Plasma/KF6. Hopefully it's been fixed at some layer in the stack, or finding the difference between my system and yours is going to be more painful.
Comment 6 Jakob Petsovits 2025-01-29 04:43:08 UTC
I guess there's also a possibility that this exposes some kind of race condition. I run debug builds for everything in my KDE build, which combined with a 5-year-old Intel system makes it naturally slower than some other setups. Qt, Firefox, Chromium and other base libraries are standard release-build Arch packages.

I can try debugging it myself, but it would take me a good while to understand the relevant code and set up a debugging environment that lets me do gdb things with KWin.
Comment 7 Jakob Petsovits 2025-01-29 04:58:18 UTC
Hold on - the title just got stuck for me also on my initial Firefox window now where I was not doing anything fullscreen-related. So the video helped to reproduce the bug (and very reliably so, on my system) but fullscreen isn't a necessity. I don't think I even had a video element present on the few pages that were open in this Firefox window since restarting the session, just KDE Bugs, Invent, GitHub and my lean email provider.

So it seems like a broader issue. But still unsure how to reliably reproduce it in a different way.
Comment 8 Jakob Petsovits 2025-01-29 05:09:14 UTC
Oh, fun.

The browser window must be maximized for this to reproduce. If I try the reproduction steps with a non-maximized window, the bug does not surface.
Comment 9 Arazil 2025-01-31 02:08:33 UTC
I've been able to reproduce this on Arch Linux under KDE Plasma 6.2.91 (Beta 2).

Problem Description: Firefox is unable to update the window title bar field after it goes from maximized mode to borderless full screen mode (either via "play video full screen" option or the "F11" key).

Set up:
* I am using AMDGPU, hardware video acceleration, and Wayland.
* Firefox is set to use the system provided title bar under the "Customize Toolbar" menu.
* Firefox is maximized.
* A mixture of tabs (both video and non-video) are active in Firefox.

Reproduction Steps and Findings:
1. Navigate among various Firefox tabs while Firefox is maximized. The window title updates normally.
2. Trigger the current tab to go borderless full screen by pressing the "F11" key. Window title updates normally.
3. Press "F11" to return to maximized mode. Window title is now stuck on the last borderless full screen title bar.
4. Navigate among various Firefox tabs while Firefox is maximized. The window title no longer updates and is still stuck at the last borderless full screen value.
5. Pressing "F11" twice to temporarily trigger a return to borderless full screen will update the title bar to the currently active tab. It does not resolve the stuck title bar issue.
Comment 10 Bug Janitor Service 2025-01-31 11:12:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/514
Comment 11 Bug Janitor Service 2025-01-31 12:20:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/oxygen/-/merge_requests/65
Comment 12 Vlad Zahorodnii 2025-01-31 15:59:21 UTC
Git commit 31998126b20324eb97c920cc00a3aa1a4f17a7c4 by Vlad Zahorodnii.
Committed on 31/01/2025 at 15:59.
Pushed by vladz into branch 'master'.

kdecoration: Update titlebar when borders change

updateTitleBar() uses borderTop() so it should be called again when
borders change.

The root cause of the bug: when the caption changes, breeze is going
to schedule a repaint for titleBar(). Since it's not properly
updated when the borders change, the title bar may not be repainted
as expected.

M  +1    -0    kdecoration/breezedecoration.cpp

https://invent.kde.org/plasma/breeze/-/commit/31998126b20324eb97c920cc00a3aa1a4f17a7c4
Comment 13 Vlad Zahorodnii 2025-01-31 16:11:11 UTC
Git commit 27685e2e12b7356db1947f7d2b7e46fb8becc720 by Vlad Zahorodnii.
Committed on 31/01/2025 at 15:59.
Pushed by vladz into branch 'Plasma/6.3'.

kdecoration: Update titlebar when borders change

updateTitleBar() uses borderTop() so it should be called again when
borders change.

The root cause of the bug: when the caption changes, breeze is going
to schedule a repaint for titleBar(). Since it's not properly
updated when the borders change, the title bar may not be repainted
as expected.


(cherry picked from commit 31998126b20324eb97c920cc00a3aa1a4f17a7c4)

9fc41c08 kdecoration: Update titlebar when borders change

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +1    -0    kdecoration/breezedecoration.cpp

https://invent.kde.org/plasma/breeze/-/commit/27685e2e12b7356db1947f7d2b7e46fb8becc720
Comment 14 Vlad Zahorodnii 2025-02-01 16:40:21 UTC
Git commit 584a65ee985ec510278cd31e97abd9051e8585cb by Vlad Zahorodnii.
Committed on 31/01/2025 at 12:21.
Pushed by vladz into branch 'master'.

kdecoration: Update titlebar when borders change

updateTitleBar() uses borderTop() so it should be called again when
borders change.

M  +1    -0    kdecoration/oxygendecoration.cpp

https://invent.kde.org/plasma/oxygen/-/commit/584a65ee985ec510278cd31e97abd9051e8585cb
Comment 15 Bug Janitor Service 2025-02-01 16:41:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/oxygen/-/merge_requests/66
Comment 16 Vlad Zahorodnii 2025-02-01 16:44:20 UTC
Git commit 96b9ce29d1c02639a6243241072b5ac746f852d1 by Vlad Zahorodnii.
Committed on 01/02/2025 at 16:40.
Pushed by vladz into branch 'Plasma/6.3'.

kdecoration: Update titlebar when borders change

updateTitleBar() uses borderTop() so it should be called again when
borders change.


(cherry picked from commit 584a65ee985ec510278cd31e97abd9051e8585cb)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +1    -0    kdecoration/oxygendecoration.cpp

https://invent.kde.org/plasma/oxygen/-/commit/96b9ce29d1c02639a6243241072b5ac746f852d1
Comment 17 nope1000000 2025-03-05 11:45:40 UTC
It seems that the commit applied to oxygen for solving this bug is now causing another bug https://bugs.kde.org/show_bug.cgi?id=500976 This is present since KDE Plasma 6.3.0
Comment 18 Nate Graham 2025-03-05 14:11:59 UTC
No need to re-open this if there's a new and separate issue; closing again.
Comment 19 Nate Graham 2025-03-05 14:12:46 UTC
No need to re-open this if there's a *new* issue; re-closing and marking the new issue as related.