Bug 509979

Summary: Popup menus are stuck to a portion of the screen under fractional scaling on Hyprland/Sway
Product: [Developer tools] Qt/KDE Flatpak Runtime Reporter: eff3ctsb0t
Component: generalAssignee: Aleix Pol <aleixpol>
Status: REPORTED ---    
Severity: normal CC: aacid
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: A demonstration of this bug.

Description eff3ctsb0t 2025-09-27 00:30:46 UTC
Created attachment 185310 [details]
A demonstration of this bug.

SUMMARY
Flatpak applications using Qt as their toolkit have their popup menus constrained to the left half of the screen when using fractional scaling on Hyprland or Sway. As an example, right-clicking on the right side of OBS's window causes the popup menu to appear in the middle of the screen instead of directly next to the cursor. I was also able to reproduce this issue with Shotcut (Qt 6.8.3), KeePassXC (Qt 5.15.15) and Vorta (Qt 6.9).

STEPS TO REPRODUCE
1. Install OBS via Flatpak
2. Set Hyprland's or Sway's scaling to a fractional value
3. Open OBS, then right-click on the right side of its window

OBSERVED RESULT
The popup menu appears in the middle of the screen.

EXPECTED RESULT
The popup menu appears directly next to the cursor.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux, Kernel 6.16.8.arch3-1
KDE Plasma Version: ---
KDE Frameworks Version: ---
Qt Version: 5.15.15 - 6.9

ADDITIONAL INFORMATION
This issue does not occur with natively installed Qt applications or when their Flatpak variants are run under Xwayland.