Bug 482587

Summary: When snapping a CSD Firefox window, the top border briefly shows the wrong resize cursor
Product: [Plasma] kwin Reporter: daf <daf.public>
Component: Quick TilingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: minor CC: gudvinr+kde, nate
Priority: NOR Keywords: qt6
Version First Reported In: 6.0.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description daf 2024-03-06 21:07:52 UTC
SUMMARY
When snapping a firefox window the top border shows wrong resize cursor instead of the resize cursor of the user selected theme. unsnapping the top border shows the correct cursor again.


STEPS TO REPRODUCE
1. Snap a firefox window to the side
2. Hover top window border


OBSERVED RESULT

The default GTK resize cursor is shown 

EXPECTED RESULT

The selected theme resize cursor to be shown
SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.8-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS ELITE
System Version: -CF

ADDITIONAL INFORMATION
Comment 1 Vlad Zahorodnii 2024-03-07 13:53:56 UTC
Please post some screenshots
Comment 2 Nate Graham 2024-03-07 17:20:11 UTC
Indeed. Also, cannot reproduce on Wayland. Can you see if it affects Wayland too, or only X11?
Comment 3 daf 2024-03-07 23:14:47 UTC
While making a video I've realised that what's actually happening is that the inner Firefox window border always shows the incorrect resize cursor, but when not snapped there's a second border around the window that shows the correct cursor.

See below video showing behaviour.

 https://youtu.be/vT_CYkm7C-0
Comment 4 daf 2024-03-07 23:16:59 UTC
Forgot to mention that on Wayland firefox ignores all Plasma styling thus it never shows the correct cursor

https://bugs.kde.org/show_bug.cgi?id=482582
Comment 5 Nate Graham 2024-03-08 21:24:18 UTC
Thanks. Can you reproduce the issue if you turn on the system-provided titlebars, rather than using built-in CSD headerbars?
Comment 6 daf 2024-03-09 03:37:19 UTC
 (In reply to Nate Graham from comment #5)
> Thanks. Can you reproduce the issue if you turn on the system-provided
> titlebars, rather than using built-in CSD headerbars?

No, only seems to happen with CSD enabled.

While testing it i did notice some odd behaviour, the mouse clicks started to get registered several pixels higher then the cursor so clicks on tabs would get registered on the desktop.

Could sometimes reproduce by making a new incognito window and then snapping it. When it triggers the window flashes in a smaller size before expanding to the snapped area, i've made a video of it bellow.

https://www.youtube.com/watch?v=j3qv4bqQgSo
Comment 7 Nate Graham 2024-03-10 03:12:33 UTC
If it only happens with CSD windows, then I'm afraid this is a Firefox bug.
Comment 10 gudvinr+kde 2024-03-11 07:34:32 UTC
(In reply to Nate Graham from comment #5)
> Thanks. Can you reproduce the issue if you turn on the system-provided
> titlebars, rather than using built-in CSD headerbars?

I can reproduce this either way but behaviour is slightly different.
With CSD enabled, I get an offset.
With system title bar enabled, there is no offset but top part of the window (under titlebar but inside an app) is unresponsive. Height of said part is roughly the same as offset you get with CSD enabled.
Comment 11 daf 2024-03-12 19:11:42 UTC
While the cursor issue has been confirmed a firefox bug, the cursor offset might be a plasma one, should I change the title of this bug?

Related report: https://bugzilla.mozilla.org/show_bug.cgi?id=1884567