Bug 465156

Summary: Visualization preview is not centered (wayland)
Product: [Plasma] kwin Reporter: hasezoey
Component: effects-tabboxAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED LATER    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.26.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Picture showing that multiple preview can be opened / shown at the same time

Description hasezoey 2023-02-02 06:00:27 UTC
Created attachment 155870 [details]
Picture showing that multiple preview can be opened / shown at the same time

SUMMARY
The preview for "Task Switcher Visualization" is not centered on the screen and only stays at the top right (probably 0,0)
It only opens on the primary display, unlike the non-preview version which opens where the mouse is.
Also it can be opened multiple times by continuously pressing the preview button (where the shadow gets visibly darker the more previews are opened), see attached picture.

The Actual Visualization when pressing the Shortcut is centered.

STEPS TO REPRODUCE
0. Ensure kwin is running in wayland
1. Go to Task-Switcher settings
2. Enable visualization
3. Press the "Preview" button
4. Observe Preview to be in the top-right

OBSERVED RESULT
Preview is in top-right

EXPECTED RESULT
Preview is centered like the non-preview version

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.7-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX Vega
Manufacturer: ASUS

ADDITIONAL INFORMATION
Only affects the preview, does not affect the version brought up via the shortcuts
Comment 1 hasezoey 2023-02-02 06:03:25 UTC
And i also just noticed that all the previews that were opened, except the last one *will not get closed* by clicking away, pressing ESC or closing the Task-Switcher config window and has to be manually killed (via something like htop)
Comment 2 Vlad Zahorodnii 2023-02-02 17:31:23 UTC
qt from our patch collection has a patch to keep toplevels at 0,0 to prevent a popup bug. whether it's the root cause can be confirmed by running 

QT_WAYLAND_DISABLE_FIXED_POSITIONS=1 systemsettings5

to be fixed in plasma 6
Comment 3 hasezoey 2023-02-02 17:33:36 UTC
> QT_WAYLAND_DISABLE_FIXED_POSITIONS=1 systemsettings5

yes this fixes the issue where the preview is in the top-right (is with this fix centered), but does not solve the issue of the preview not closing without killing "systemsettings5"