Bug 440201 - Windows appear detached from titlebars in Present Windows and Desktop Grid
Summary: Windows appear detached from titlebars in Present Windows and Desktop Grid
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-present-windows (show other bugs)
Version: git master
Platform: Neon Linux
: VHI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-07-23 15:54 UTC by Bharadwaj Raju
Modified: 2021-08-11 17:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of the bug (569.79 KB, image/png)
2021-07-23 15:54 UTC, Bharadwaj Raju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bharadwaj Raju 2021-07-23 15:54:32 UTC
Created attachment 140284 [details]
Screenshot of the bug

Windows appear detached from their titlebars in Present Windows and Desktop Grid. Plus they have a shadow which seems to be not in the right place.

Screenshot attached.


SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
I'm using the Plasma Wayland session.
Comment 1 Nate Graham 2021-07-23 15:57:27 UTC
Can confirm that this started happening within the last month or so. X11 and Wayland are affected.
Comment 2 Vlad Zahorodnii 2021-08-11 17:12:33 UTC
Git commit 4912c7cfa2e54c2f5ad491f868aaae43135ca172 by Vlad Zahorodnii.
Committed on 11/08/2021 at 16:43.
Pushed by vladz into branch 'master'.

scenes/opengl: Calculate item transforms differently

Currently, a vertex coordinate is transformed first, then mapped to
the global screen coordinates. This causes a problem if a transform
is applied to the top-most item and child items are not at (0, 0).
For example, scaled windows may have popping out sub-surfaces, etc.

With this change, the item transforms will be computed differently. For
example, if the parent item is transformed, a child's transform will
look as follows

  [Parent's translation][Parent's transform][Child's translation]

instead of

  [Parent's translation][Child's translation][Parent's transform]

In the future, I'd like to get rid of the Item::setTransform() call in
OpenGLWindow::performPaint() and have either AnimationEffect or
libkwineffects call Item::setTransform().

M  +10   -0    src/item.cpp
M  +4    -0    src/item.h
M  +43   -32   src/plugins/scenes/opengl/scene_opengl.cpp
M  +1    -1    src/plugins/scenes/opengl/scene_opengl.h

https://invent.kde.org/plasma/kwin/commit/4912c7cfa2e54c2f5ad491f868aaae43135ca172
Comment 3 Alexandre Pereira 2021-08-11 17:59:43 UTC
nice !

this also fixed "firefox wayland" "window opening" when using the "scale effect".

( it used to look like the window was divided into 4 parts all growing )