Bug 428595

Summary: Window thumbnails of client-side decorated apps are clipped
Product: [Plasma] kwin Reporter: Vlad Zahorodnii <vlad.zahorodnii>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: justin.zobel, nate
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.20.4
Attachments: Screenshot
Screenshot2

Description Vlad Zahorodnii 2020-11-02 09:18:54 UTC
STEPS TO REPRODUCE
1. Run Firefox without system titlebar
2. Hover the icon of Firefox in the task manager

OBSERVED RESULT
The window thumbnail is clipped so only top and right portion of the client-side drop shadow is visible.

EXPECTED RESULT
The window thumbnail is not clipped or clipped, but properly.
Comment 1 Justin Zobel 2020-11-03 00:00:50 UTC
Created attachment 132974 [details]
Screenshot

I can't seem to reproduce on KDE Neon User Edition.
Comment 2 Vlad Zahorodnii 2020-11-03 08:06:14 UTC
(In reply to Justin Zobel from comment #1)
> I can't seem to reproduce on KDE Neon User Edition.

This is probably because Firefox is maximized in your screenshot.
Comment 3 Justin Zobel 2020-11-03 23:03:21 UTC
Created attachment 133006 [details]
Screenshot2

Even with the window in a normal state I get a normal preview.
Comment 4 Vlad Zahorodnii 2020-11-05 09:09:25 UTC
(In reply to Justin Zobel from comment #3)
> Created attachment 133006 [details]
> Screenshot2
> 
> Even with the window in a normal state I get a normal preview.

Firefox has no drop-shadow. Are you using default GTK theme (Breeze)?
Comment 5 Justin Zobel 2020-11-06 05:47:55 UTC
(In reply to Vlad Zahorodnii from comment #4)
> (In reply to Justin Zobel from comment #3)
> > Created attachment 133006 [details]
> > Screenshot2
> > 
> > Even with the window in a normal state I get a normal preview.
> 
> Firefox has no drop-shadow. Are you using default GTK theme (Breeze)?

Breeze Dark.
Comment 6 Bug Janitor Service 2020-11-27 14:40:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/497
Comment 7 Vlad Zahorodnii 2020-11-27 15:34:49 UTC
Git commit e298caaa7ac8c9d3853929492770ced55faf0818 by Vlad Zahorodnii.
Committed on 27/11/2020 at 15:34.
Pushed by vladz into branch 'master'.

wayland: Fix clipped thumbnails of client-side decorated apps

The buffer offset for client-side decorated windows is not 0, this plus
mixing the frame position and the client size may result in clipped
thumbnails of client-side decorated applications, such as gedit, etc.

M  +2    -6    plugins/scenes/opengl/scene_opengl.cpp

https://invent.kde.org/plasma/kwin/commit/e298caaa7ac8c9d3853929492770ced55faf0818
Comment 8 Vlad Zahorodnii 2020-11-27 15:35:56 UTC
Git commit 038aa9d8d7effc2170d66b5d12c25d704ebcaa46 by Vlad Zahorodnii.
Committed on 27/11/2020 at 15:35.
Pushed by vladz into branch 'Plasma/5.20'.

wayland: Fix clipped thumbnails of client-side decorated apps

The buffer offset for client-side decorated windows is not 0, this plus
mixing the frame position and the client size may result in clipped
thumbnails of client-side decorated applications, such as gedit, etc.


(cherry picked from commit e298caaa7ac8c9d3853929492770ced55faf0818)

M  +2    -6    plugins/scenes/opengl/scene_opengl.cpp

https://invent.kde.org/plasma/kwin/commit/038aa9d8d7effc2170d66b5d12c25d704ebcaa46