Bug 386304 - [Wayland] Several task switchers are not centered on screen
Summary: [Wayland] Several task switchers are not centered on screen
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 5.15.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: reproducible, usability
: 387456 394153 397032 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-28 22:39 UTC by Patrick Silva
Modified: 2019-09-23 15:46 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2017-10-28 22:39:12 UTC
task switchers below appear on top left corner under Wayland.

breeze dark
only text
small icons
informative
compact
thumbnails

opensuse krypton, qt 5.10
Comment 1 Martin Flöser 2017-10-29 06:29:39 UTC
Which exact version are you using?
Comment 2 Patrick Silva 2017-10-29 12:08:53 UTC
version 5.11.90git.20171028T043813~145bfd168-93.1

"large icons" switcher is affected too.
Comment 3 Martin Flöser 2017-11-01 09:05:24 UTC
Just tried and can reproduce.
Comment 4 Martin Flöser 2017-11-01 17:52:57 UTC
So tried some more. When using multi screen it works sometimes.
Comment 5 Patrick Silva 2017-12-01 16:22:47 UTC
*** Bug 387456 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2018-01-17 01:55:19 UTC
plasma 5.12 beta is affected.
Comment 7 pbs3141 2018-02-10 01:45:02 UTC
Also: sometimes the task switcher or just its background blur momentarily appears in the screen centre.

Observed on plasma 5.12.
Comment 8 Michael D 2018-03-13 15:34:21 UTC
It centers for me on the first invocation sometimes, but then the entries are not highlighted. On the next invocation, it appears at the top left.
Comment 9 Patrick Silva 2018-03-13 15:35:52 UTC
(In reply to Michael D from comment #8)
> It centers for me on the first invocation sometimes, but then the entries
> are not highlighted. On the next invocation, it appears at the top left.

Same on my system.
Comment 10 Alexander Mentyu 2018-04-08 10:14:15 UTC
Sometimes after changing of visualization in Task Switcher - it appears in the center (looks like more likely after changing into 'Grid' visualization - using it - and changing back into 'Breeze Dark' for example) - and also after some time of changing of various visualizations - they all starting to show up in the center

Plasma: 5.12.4
Apps: 17.12.4
Frameworks: 5.44.0
Qt: 5.10.1
Kernel: 4.14.32-1-MANJARO
OS: Netrunner Rolling
Video: Intel 4400
Driver: xf86-video-intel 1:2.99.917+823+gd9bf46e4-1
Screen: 1600x900
wayland-protocols 1.13-1
wayland 1.14.0-1
Comment 11 Patrick Silva 2018-05-12 11:18:37 UTC
*** Bug 394153 has been marked as a duplicate of this bug. ***
Comment 12 Roman Gilg 2018-05-15 12:06:32 UTC
I investigated this problem a bit further. At this late position

https://phabricator.kde.org/source/kwin/browse/master/tabbox/tabboxhandler.cpp;184b490c78a3a3e5ae25105c08b19fc375e8c64c$395

the correct d->window()->x() value is still set (in my case to 498). Some time later it gets reset to 0 for some reason. For example in the delayed call to initHighlightWindows it is already 0.
Comment 13 Nate Graham 2018-05-15 21:11:40 UTC
If you fix this, I'll be really close to being able to make the switch to Wayland full time! :)
Comment 14 Roman Gilg 2018-05-22 11:51:35 UTC
I have created a Phab task for in-depth technical discussion of the problem(s): https://phabricator.kde.org/T8771
Comment 15 Roman Gilg 2018-05-24 08:12:48 UTC
Potential fix: https://phabricator.kde.org/D13084
Comment 16 David Edmundson 2018-08-01 01:21:16 UTC
*** Bug 397032 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2018-08-20 12:00:52 UTC
*** Bug 397586 has been marked as a duplicate of this bug. ***
Comment 18 Roman Gilg 2018-09-03 09:26:04 UTC
Git commit 1fb2eace3fbfc6645e024aa0f5003306ac60a417 by Roman Gilg.
Committed on 03/09/2018 at 09:25.
Pushed by romangilg into branch 'master'.

Avoid invalid geometry of internal clients through plasma surface interface

Summary:
Internal KWin windows might be not in sync with their PlasmaShellSurface.
This could be a problem in general, but for now atleast guard against
invalid setPosition requests.

Test Plan: Manually

Reviewers: #kwin, davidedmundson

Subscribers: davidedmundson, ngraham, graesslin, kwin

Tags: #kwin

Maniphest Tasks: T8771

Differential Revision: https://phabricator.kde.org/D13084

M  +6    -1    shell_client.cpp

https://commits.kde.org/kwin/1fb2eace3fbfc6645e024aa0f5003306ac60a417
Comment 19 Patrick Silva 2019-03-18 16:40:45 UTC
This bug is back on neon dev unstable.
The following task switchers are not centered on screen:
compact
thumbnails
grid
large icons
small icons
text only
informative
breeze dark
Comment 20 Vlad Zahorodnii 2019-03-19 09:00:05 UTC
I'd say that was intentional, see 9b922f88332fc470dcb50e9b55c7d69ab7da4d4c
Comment 21 Nate Graham 2019-03-19 09:12:43 UTC
We need to fix that then, because these task switchers are supposed to be centered.
Comment 22 Vlad Zahorodnii 2019-03-19 09:41:04 UTC
> We need to fix that then
As any other bug ;-)

There were definitely some problems with 1fb2eac (if you read the review comments), so we have to find a better solution.
Comment 23 David Edmundson 2019-03-19 11:44:05 UTC
I think there's a solution coming.

Once we kill the wl_surface from the internal windows all the races go away and it will "just work".

AFAIK that's blocked mostly on shadows that I started.
Comment 24 Martin Flöser 2019-03-19 17:40:00 UTC
Also blocked on me having less time currently. Hopefully next week...
Comment 25 Roman Gilg 2019-03-21 10:39:45 UTC
Since there is now again enough time on the next release, maybe a proper fix can land before that. If we don't find one in time, the if-conditional can be added back shortly before release. Should still work as a workaround.

Of course not so convenient for people on Dev Unstable until then, but it's not a fatal bug.

Thanks for reporting back and reopening Patrick.
Comment 26 Roman Gilg 2019-05-16 22:18:50 UTC
This hasn't been fixed for 5.16, right? The workaround should then be added back again, which got removed in 9b922f88332fc470dcb50e9b55c7d69ab7da4d4c.
Comment 27 Vlad Zahorodnii 2019-05-17 07:31:20 UTC
(In reply to Roman Gilg from comment #26)
> This hasn't been fixed for 5.16, right? The workaround should then be added
> back again, which got removed in 9b922f88332fc470dcb50e9b55c7d69ab7da4d4c.

ack, do you want to submit the patch?
Comment 28 Roman Gilg 2019-06-05 14:46:47 UTC
Git commit 7c7fb758ad66033c63354c0d71780eb47dc218ce by Roman Gilg.
Committed on 05/06/2019 at 14:40.
Pushed by romangilg into branch 'Plasma/5.16'.

Avoid again invalid geometry of internal clients

Summary:
This adds again the workaround from 1fb2eace3fbf, which got temporarily
removed by 9b922f88332f.

Test Plan: Manually

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21601

M  +6    -1    shell_client.cpp

https://commits.kde.org/kwin/7c7fb758ad66033c63354c0d71780eb47dc218ce
Comment 29 Vlad Zahorodnii 2019-09-23 15:46:21 UTC
Git commit bebe81209cccc4737a357ad825c6b850ce9302bf by Vlad Zahorodnii, on behalf of Vlad Zagorodniy.
Committed on 23/09/2019 at 14:28.
Pushed by vladz into branch 'master'.

Port QPA away from Wayland

Summary:
So far wayland was used by internal clients to submit raster buffers
and position themselves on the screen. While we didn't have issues with
submitting raster buffers, there were some problems with positioning
task switchers. Mostly, because we had effectively two paths that may
alter geometry.

A better approach to deal with internal clients is to let our QPA use
kwin core api directly. This way we can eliminate unnecessary roundtrips
as well make geometry handling much easier and comprehensible.

The last missing piece is shadows. Both Plasma::Dialog and Breeze widget
style use platform-specific APIs to set and unset shadows. We need to
add shadows API to KWindowSystem. Even though some internal clients lack
drop-shadows at the moment, I don't consider it to be a blocker. We can
add shadows back later on.

Reviewers: #kwin, davidedmundson, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Maniphest Tasks: T9600

Differential Revision: https://phabricator.kde.org/D22810

M  +6    -0    abstract_client.cpp
M  +9    -0    abstract_client.h
M  +9    -7    autotests/integration/debug_console_test.cpp
M  +8    -6    autotests/integration/decoration_input_test.cpp
M  +5    -3    autotests/integration/effects/popup_open_close_animation_test.cpp
M  +6    -4    autotests/integration/globalshortcuts_test.cpp
M  +44   -54   autotests/integration/internal_window.cpp
M  +18   -18   composite.cpp
M  +32   -46   debug_console.cpp
M  +3    -2    debug_console.h
M  +7    -1    deleted.cpp
M  +2    -0    deleted.h
M  +14   -9    effects.cpp
M  +1    -4    geometry.cpp
M  +4    -0    idle_inhibition.cpp
M  +6    -5    input.cpp
M  +469  -120  internal_client.cpp
M  +62   -15   internal_client.h
M  +6    -6    layers.cpp
M  +113  -5    platformsupport/scenes/opengl/abstract_egl_backend.cpp
M  +2    -0    platformsupport/scenes/opengl/abstract_egl_backend.h
M  +0    -2    plugins/qpa/CMakeLists.txt
M  +45   -70   plugins/qpa/backingstore.cpp
M  +3    -15   plugins/qpa/backingstore.h
M  +3    -61   plugins/qpa/integration.cpp
M  +2    -18   plugins/qpa/integration.h
D  +0    -106  plugins/qpa/nativeinterface.cpp
D  +0    -47   plugins/qpa/nativeinterface.h
M  +7    -5    plugins/qpa/sharingplatformcontext.cpp
M  +40   -49   plugins/qpa/window.cpp
M  +10   -34   plugins/qpa/window.h
M  +22   -2    plugins/scenes/opengl/scene_opengl.cpp
M  +10   -0    plugins/scenes/qpainter/scene_qpainter.cpp
M  +9    -10   pointer_input.cpp
M  +7    -11   scene.cpp
M  +8    -0    scene.h
M  +7    -42   shell_client.cpp
M  +5    -20   shell_client.h
M  +1    -1    tabbox/tabbox.cpp
M  +5    -9    toplevel.cpp
M  +18   -5    toplevel.h
M  +2    -35   wayland_server.cpp
M  +0    -5    wayland_server.h
M  +47   -25   workspace.cpp
M  +40   -5    workspace.h

https://commits.kde.org/kwin/bebe81209cccc4737a357ad825c6b850ce9302bf