Bug 486023 - Maximizing or restoring window over a WezTerm window introduces visible glitches
Summary: Maximizing or restoring window over a WezTerm window introduces visible glitches
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-23 15:03 UTC by hexchain
Modified: 2024-09-27 12:45 UTC (History)
0 users

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


Attachments
Screen recording (2.68 MB, video/webm)
2024-04-23 15:03 UTC, hexchain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hexchain 2024-04-23 15:03:07 UTC
Created attachment 168840 [details]
Screen recording

SUMMARY
Glitches can be seen when maximizing or restoring a window on top of a WezTerm window.

STEPS TO REPRODUCE
1. Download the latest WezTerm release from https://github.com/wez/wezterm/releases/tag/20240203-110809-5046fc22. In my screen recording, I used WezTerm-20240203-110809-5046fc22-Ubuntu20.04.AppImage.
2. Run WezTerm in Wayland mode and maximize the window:
> ./wezterm.appimage -n --config "enable_wayland=true"
3. Open another window, and try to maximize/restore it.

OBSERVED RESULT
The WezTerm window in the background glitches briefly when maximizing and restoring. Notice the top left corner of the screen: the WezTerm window content looks stretched when the other window is maximizing.

EXPECTED RESULT
There should not be any visible glitches.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
It also happens on git master.
Comment 1 Vlad Zahorodnii 2024-09-27 09:24:32 UTC
[1579325.746] xdg_toplevel#27.configure(2560, 1366, array[8])
[1579325.762] xdg_surface#26.configure(486)
[1579325.775]  -> xdg_surface#26.ack_configure(486)
[1579325.824]  -> xdg_surface#26.set_window_geometry(0, 0, 2560, 1366)
[1579326.246]  -> wl_surface#22.commit()
[1579326.267]  -> wl_surface#22.frame(new id wl_callback#43)

wezterm incorrectly handles maximize requests. what happens now:

- kwin asks wezterm to maximize
- wezterm acks the request and tells kwin that it has finished processing the maximize request
- wezterm repaints the window with the new size later

what **should** happen:

- kwin asks wezterm to maximize
- wezterm repaints the window with the new size
- wezterm acks the maximize request sent by kwin earlier

Can you report this issue to wezterm developers please?
Comment 2 Vlad Zahorodnii 2024-09-27 12:09:53 UTC
Git commit c4116173aa689bb9d1d5c59b248052b601866c32 by Vlad Zahorodnii.
Committed on 27/09/2024 at 12:09.
Pushed by vladz into branch 'master'.

effect: Make cancel() properly cancel cross-fade animation

Currently, when a cancel() is called for a cross-fade animation, the
window will not be unredirected.
Related: bug 488893

M  +4    -5    src/effect/animationeffect.cpp

https://invent.kde.org/plasma/kwin/-/commit/c4116173aa689bb9d1d5c59b248052b601866c32
Comment 3 Bug Janitor Service 2024-09-27 12:30:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6530
Comment 4 Vlad Zahorodnii 2024-09-27 12:45:41 UTC
Git commit ae4d171d2a024d8942642dbdf984fbe7e567fa8c by Vlad Zahorodnii.
Committed on 27/09/2024 at 12:45.
Pushed by vladz into branch 'Plasma/6.2'.

effect: Make cancel() properly cancel cross-fade animation

Currently, when a cancel() is called for a cross-fade animation, the
window will not be unredirected.
Related: bug 488893


(cherry picked from commit c4116173aa689bb9d1d5c59b248052b601866c32)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +4    -5    src/effect/animationeffect.cpp

https://invent.kde.org/plasma/kwin/-/commit/ae4d171d2a024d8942642dbdf984fbe7e567fa8c