Bug 348064

Summary: deco hadling of shade changes screw the window geometry
Product: [Plasma] kwin Reporter: Thomas Lübking <thomas.luebking>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cthol, hugo.pereira.da.costa, ptselios
Priority: NOR Flags: thomas.luebking: ReviewRequest+
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://git.reviewboard.kde.org/r/123882/
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Thomas Lübking 2015-05-21 15:06:32 UTC
There seems something *severely* screwed about the geometry handling of shaded windows, eg. they jump back to their old position and sometimes resize to some tiny (minimum?) geometry when being moved (around finishMoreResize)

Reproducible: Always
Comment 1 Hugo Pereira Da Costa 2015-05-21 15:14:03 UTC
I confirm
Comment 2 Thomas Lübking 2015-05-21 23:11:55 UTC
Happens for unshading, (one) trigger is the emittance of "shadeChanged()"
The geometry is ok up to this point, broken afterwards.
Comment 3 Thomas Lübking 2015-05-21 23:20:40 UTC
blocking the forwarding in decoratedclient.cpp "fixes" most perceived issues, but (modal) dialog re-place to the screen center on unshading.

All this has no inpact on the decoration border artifacts.
Comment 4 Thomas Lübking 2015-06-10 07:42:59 UTC
Git commit 0b9cfffe1ae6d62366098f1f1ca19ce7eb224bd1 by Thomas Lübking.
Committed on 10/06/2015 at 06:50.
Pushed by luebking into branch 'master'.

checkWorkspacePosition: Don't adjust to shaded sz

since the client is currently empty, we'll resort
to client hints, ie. effectively resize windows
when shading them (setGeometry and plainResize have
extra checks on whether this geometry is only the decoration
height to not smear client_size)

REVIEW: 123882

M  +2    -1    geometry.cpp

http://commits.kde.org/kwin/0b9cfffe1ae6d62366098f1f1ca19ce7eb224bd1
Comment 5 Thomas Lübking 2015-06-10 07:42:59 UTC
Git commit 1eae9f4baf63f83f76235cf39ba242057500ec8d by Thomas Lübking.
Committed on 10/06/2015 at 06:50.
Pushed by luebking into branch 'master'.

improve geometry handling on bordersChanged

a) calculateGravitation on the same borders forth and back is idempotent
b) do not checkWorkspacePosition for shaded windows
   may falsely constrain the unshaded geometry into screen bounds

REVIEW: 123882

M  +6    -3    client.cpp

http://commits.kde.org/kwin/1eae9f4baf63f83f76235cf39ba242057500ec8d
Comment 6 Thomas Lübking 2015-06-10 07:43:00 UTC
Git commit 42f53eccbdb380144e291a003213375f3922cee1 by Thomas Lübking.
Committed on 10/06/2015 at 06:50.
Pushed by luebking into branch 'master'.

update geom_restore on unshading

REVIEW: 123882

M  +1    -0    client.cpp

http://commits.kde.org/kwin/42f53eccbdb380144e291a003213375f3922cee1
Comment 7 Thomas Lübking 2015-07-04 17:28:26 UTC
*** Bug 349902 has been marked as a duplicate of this bug. ***
Comment 8 Thomas Lübking 2015-08-19 08:17:54 UTC
*** Bug 351161 has been marked as a duplicate of this bug. ***