Bug 496574

Summary: Incorrect placement of titlebar application menu
Product: [Plasma] kwin Reporter: Mark Bolhuis <mark>
Component: appmenuAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: minor CC: john.kizer, kde, nate
Priority: NOR    
Version First Reported In: 6.2.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mark Bolhuis 2024-11-22 07:16:02 UTC
SUMMARY
The application menu bar is placed incorrectly.

STEPS TO REPRODUCE
1. Disable any display scaling
2.  Configure the title bar to include the application menu. 
System Settings -> Colors and Themes -> Window Decorations -> Configure Titlebar Buttons
3. Put the window is different places, and click the application menu on the titlebar.

OBSERVED RESULT
The menu is placed at approximately (2x, 2y) where (x, y) is the position of the button. 

EXPECTED RESULT
The menu should be placed at the button.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 28 × Intel® Core™ i7-14700K
Memory: 30.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION
When display scaling is enabled, fractional or integer, the error factor is no longer 2, but changes with the scaling factor.
From a rough observation the menu is placed at approximately (1.5x, 1.5y), for 1.25 scaling.
Comment 1 John Kizer 2024-11-24 04:57:32 UTC
I can reproduce this:

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.3
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 7800X3D 8-Core Processor
Memory: 30.4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070 SUPER/PCIe/SSE2
Comment 2 Nate Graham 2024-11-25 20:55:48 UTC
Do you have multiple screens? If so, this is Bug 413771.
Comment 3 John Kizer 2024-11-25 21:33:38 UTC
On my end at least, I only have one display - I do have Nvidia graphics, but I wasn't thinking in that direction at first since the reporter has Intel graphics.
Comment 4 Mark Bolhuis 2024-11-25 22:13:35 UTC
(In reply to Nate Graham from comment #2)
> Do you have multiple screens? If so, this is Bug 413771.

I only have one screen.
And the behaviour I see isn't quite the same as what is described in that bug report..
I'll do some more testing.
Comment 5 Nate Graham 2024-11-26 21:28:52 UTC

*** This bug has been marked as a duplicate of bug 495787 ***