Bug 366696

Summary: Plasma OSD are placed in the top left corner of the screen
Product: [Plasma] kwin Reporter: Igor Poboiko <igor.poboiko>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Flags: mgraesslin: ReviewRequest+
Priority: NOR    
Version First Reported In: 5.7.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D2627
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Igor Poboiko 2016-08-12 08:34:48 UTC
Plasma OSD that are shown when you switch virtual desktops, change volume/brightness levels, switch keyboard layout, etc. are sometimes placed on the top left corner of the screen instead of screen center. Happens only on Wayland.

Reproducible: Sometimes

Steps to Reproduce:
It happens not every time and is hard to reproduce. However, in my case if you switch virtual desktops several times right after clean startup of wayland session, first two or three times it shows OSD on the top left corner, but then switches to the screen center.
Comment 1 Martin Flöser 2016-08-12 08:38:48 UTC
Now we need to clarify: virtual desktop OSD is not the same one as the volume/brightness OSD. It has complete different implementation.

Does this only happen with the virtual desktop OSD or also with Plasma's volume OSD?
Comment 2 Igor Poboiko 2016-08-12 09:22:25 UTC
It did happen occasionally with e.g. volume OSD, but I don't have a reliable way to reproduce it.
But with virtual desktop OSD it happens always after session startup.
Comment 3 Martin Flöser 2016-08-30 06:11:22 UTC
I got the misplaced OSD as well and have an idea what triggered it.
Comment 4 Martin Flöser 2016-08-30 11:05:56 UTC
Git commit f99a456f330292fd0e4bf1871588455c7d52443e by Martin Gräßlin.
Committed on 30/08/2016 at 11:04.
Pushed by graesslin into branch 'master'.

[autotests] Extend PlasmaSurface to verify position of OSD windows

This adds a new test case which maps an OSD window and verifies that it's
positioned correctly. Then an additional screen is added which should not
affect the position, but as the test case shows: it does affect the
position.

M  +37   -0    autotests/integration/plasma_surface_test.cpp

http://commits.kde.org/kwin/f99a456f330292fd0e4bf1871588455c7d52443e
Comment 5 Martin Flöser 2016-08-30 11:21:28 UTC
And a possible fix at https://phabricator.kde.org/D2627
Comment 6 Martin Flöser 2016-08-31 13:13:13 UTC
Git commit d3741bd530cdd20eccb09f7f6e960d4c2465ac3a by Martin Gräßlin.
Committed on 31/08/2016 at 13:12.
Pushed by graesslin into branch 'master'.

Set the restore geometry after placing a ShellClient for the first time

Summary:
The restore geometry gets initially set to 0/0xsize before the placement
is done. When going into updateClientArea and then afterwards into
AbstractClient::checkWorkspacePosition the geometry restory is used for
calculating the new position. This results in windows getting moved to
0/0 when e.g. plugging in a new screen or a panel changes, etc.

This change ensures that the restore geometry is set correctly after the
first placement.

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

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

M  +0    -1    autotests/integration/plasma_surface_test.cpp
M  +7    -1    shell_client.cpp
M  +3    -0    shell_client.h
M  +2    -2    workspace.cpp

http://commits.kde.org/kwin/d3741bd530cdd20eccb09f7f6e960d4c2465ac3a