Bug 478297 - GTK4 apps have no closing animation
Summary: GTK4 apps have no closing animation
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.90.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-09 11:04 UTC by Jin Liu
Modified: 2023-12-13 14:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2023-12-09 11:04:19 UTC
STEPS TO REPRODUCE
1. Start 'd-spy'
2. Click on the  'close' button

OBSERVED RESULT
No animation

EXPECTED RESULT
Window closing animation

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.4-arch1-1 (64-bit)
Graphics Platform: offscreen
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Nate Graham 2023-12-11 22:44:52 UTC
Can reproduce.
Comment 2 Vlad Zahorodnii 2023-12-13 12:53:04 UTC
It looks like d-spy unmaps the wl_surface by attaching a nil buffer before destroying the xdg_toplevel. It's quite rare, but I guess kwin should still handle that.
Comment 3 Jin Liu 2023-12-13 12:56:37 UTC
(In reply to Vlad Zahorodnii from comment #2)
> It looks like d-spy unmaps the wl_surface by attaching a nil buffer before
> destroying the xdg_toplevel. It's quite rare, but I guess kwin should still
> handle that.

I have three GTK4 apps in my laptop: d-spy, easyeffects and kooha. And they all have this problem. So probably it's a common GTK4/libadwaita issue.
Comment 4 Bug Janitor Service 2023-12-13 13:06:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4787
Comment 5 Vlad Zahorodnii 2023-12-13 14:42:09 UTC
Git commit 3663453c7d0c5ad09120dbfff183ac80d2fe97c5 by Vlad Zahorodnii.
Committed on 13/12/2023 at 14:06.
Pushed by vladz into branch 'master'.

scene: Freeze SurfaceItem tree when the Window is closed

If the wl_surface is unmapped, the compositor should unmap the window.
Most clients don't do it, and instead destroy the wl_surface or the
surface role object or both. A very tiny fraction of clients actually
close the window by unmapping the wl_surface. Either way, it's worth
handling that case because xdg-shell protocol says that the clients are
allowed to do it.

M  +4    -0    src/scene/surfaceitem.cpp
M  +2    -0    src/scene/surfaceitem.h
M  +16   -0    src/scene/surfaceitem_wayland.cpp
M  +1    -0    src/scene/surfaceitem_wayland.h
M  +9    -0    src/scene/windowitem.cpp
M  +1    -0    src/scene/windowitem.h

https://invent.kde.org/plasma/kwin/-/commit/3663453c7d0c5ad09120dbfff183ac80d2fe97c5