Bug 496824

Summary: Firefox in SSD mode with "draw border around maximized and tiled windows" set: window jumps completely past the top screen edge when resizing down from that edge, if it was started in maximized state
Product: [Plasma] kwin Reporter: Yaroslav Sidlovsky <zawertun>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: john.kizer, nate
Priority: NOR    
Version: 6.2.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=494001
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Video with demonstration of the bug
Bug demonstration #2
Bug demonstration for new user account
Video with demonstration of the bug #2 (cut to smaller size)
Video with demonstration of the bug

Description Yaroslav Sidlovsky 2024-11-29 08:22:42 UTC
SUMMARY
Firefox window could jump out of screen bounds after update & restarting

STEPS TO REPRODUCE
1. Open Firefox and maximize it window, navigate to URL `about:restartrequired`;
2. Click restart button;
3. Start resizing Firefox window from the top. 

OBSERVED RESULT
Window should not fly away from screen bounds (see attached video).

EXPECTED RESULT
Firefox windows flies away from screen bounds and user can't drag it back no more.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.8-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor
Memory: 31.2 ГиБ of RAM
Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2
Manufacturer: ASUS

ADDITIONAL INFORMATION
Comment 1 Yaroslav Sidlovsky 2024-11-29 08:23:31 UTC
Created attachment 176211 [details]
Video with demonstration of the bug
Comment 2 Yaroslav Sidlovsky 2024-11-29 08:27:46 UTC
It seems similar to https://bugs.kde.org/show_bug.cgi?id=494001, but I have only 1 monitor on my system.
According to `about:support` page in Firefox - it's using Wayland.
Comment 3 Yaroslav Sidlovsky 2024-11-29 08:30:54 UTC
I've messed up OBSERVED and EXPECTED fields sorry.
Comment 4 John Kizer 2024-12-05 05:55:00 UTC
Hi - it's really strange, I have an almost identical OS and system to yours except for slightly different model numbers on the Nvidia card, and I can't reproduce this following what look like your exact steps!

Just to check, were you resizing the maximized window by pressing Super+right mouse button? I ask because otherwise I can't resize a maximized window in Step 3, just move it.
Comment 5 Yaroslav Sidlovsky 2024-12-06 11:03:28 UTC
I resize it by simple moving mouse cursor to upper window edge + mouse left click + drag mouse down.

No key combinations was used.
Comment 6 Yaroslav Sidlovsky 2024-12-06 11:09:17 UTC
Actually it can be reproduced without using `about:restartrequired` page in Firefox:

1. Open Firefox in maximized state (should be saved before);
2. Start to resize it's window from the top as described in comment #5.

Bug happens.
Comment 7 Yaroslav Sidlovsky 2024-12-06 11:15:01 UTC
Created attachment 176390 [details]
Bug demonstration #2
Comment 8 John Kizer 2024-12-06 20:08:17 UTC
Ah, thanks - am I right in assuming that you have the setting "Draw border on maximized and tiled windows" enabled under System Settings > Colors & Themes > Window Decorations > Breeze > General?

Are there any other custom/non-default theme-related settings that are set? (Just to try to narrow down the circumstances in which this will occur - with "Draw border on maximized and tiled windows" enabled, I still wasn't able to reproduce)
Comment 9 Yaroslav Sidlovsky 2024-12-08 11:02:26 UTC
> Ah, thanks - am I right in assuming that you have the setting "Draw border on maximized and tiled windows" enabled under System Settings > Colors & Themes > Window Decorations > Breeze > General?

Yes, this setting is set.

> Are there any other custom/non-default theme-related settings that are set? (Just to try to narrow down the circumstances in which this will occur - with "Draw border on maximized and tiled windows" enabled, I still wasn't able to reproduce)

I can test this bug on fresh user.
Comment 10 Yaroslav Sidlovsky 2024-12-08 11:19:52 UTC
Just reproduced this bug on fresh user account, just 2 settings changed:
1. Firefox: use system borders,
2. Plasma: Draw border on maximized and tiled windows (as described in #c8).
Comment 11 Yaroslav Sidlovsky 2024-12-08 11:22:59 UTC
Created attachment 176433 [details]
Bug demonstration for new user account
Comment 12 Yaroslav Sidlovsky 2024-12-08 11:31:33 UTC
Created attachment 176434 [details]
Video with demonstration of the bug #2 (cut to smaller size)
Comment 13 Yaroslav Sidlovsky 2024-12-08 11:35:56 UTC
Created attachment 176436 [details]
Video with demonstration of the bug
Comment 14 John Kizer 2024-12-09 20:00:25 UTC
Thanks - I was briefly to reproduce this on my system, but only when trying to drag the top border immediately after launching Firefox (like <2 seconds after the window appears). Any longer of a wait, and it didn't reproduce for me. Nevertheless, something funky is going on there for it to happen at all.
Comment 15 Yaroslav Sidlovsky 2024-12-09 21:47:13 UTC
Great find. I didn't think it's only working in small time window.