Bug 479943 - On Wayland, maximizing WezTerm is glitchy when the Maximize effect is enabled
Summary: On Wayland, maximizing WezTerm is glitchy when the Maximize effect is enabled
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-17 13:55 UTC by hexchain
Modified: 2024-06-10 11:46 UTC (History)
1 user (show)

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


Attachments
Wayland debug log (205.86 KB, text/x-log)
2024-01-17 13:58 UTC, hexchain
Details
WezTerm maximize animation (1.07 MB, video/x-matroska)
2024-01-17 14:05 UTC, hexchain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hexchain 2024-01-17 13:55:26 UTC
SUMMARY
Please see the attached screencast.

STEPS TO REPRODUCE
1. Download WezTerm nightly (the last released version does not work on Wayland under KWin 6, due to a bug in its GUI tookit)
2. Start WezTerm, and maximize.

OBSERVED RESULT
I don't know how to describe it, sorry. Please see the attachment.

EXPECTED RESULT
The window should maximize normally.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.0-arch3-1 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon Graphics

KWin fd2e77317f99b159bb023420051be17383520bae
Comment 1 hexchain 2024-01-17 13:58:13 UTC
Created attachment 164980 [details]
Wayland debug log
Comment 2 hexchain 2024-01-17 14:05:23 UTC
Created attachment 164982 [details]
WezTerm maximize animation
Comment 3 Vlad Zahorodnii 2024-01-17 14:50:51 UTC
It doesn't start on my machine

interface 'wl_surface' has no event 2
16:50:14.005  ERROR  wezterm_gui > running message loop: error during event_q.dispatch protocol_error=None: Resource temporarily unavailable (os error 11); terminating

do you know if this glitch can be observed in other desktop environments or compositors?
Comment 4 hexchain 2024-01-17 14:54:33 UTC
You'll need the latest nightly version. The last released version does not work on Wayland under KWin 6, due to a bug in its GUI toolkit: https://github.com/wez/wezterm/issues/3996
Comment 5 hexchain 2024-01-17 14:59:34 UTC
In Weston, WezTerm exits with an error when maximizing:

22:56:01.832  ERROR  wezterm_gui                     > running message loop: Error while flushing display: Broken pipe (os error 32); terminating
Comment 6 Aru Sahni 2024-03-23 01:58:49 UTC
For those following along, the fix for the aforementioned Wezterm bug that caused it to crash on Wayland is now in an official stable version. The maximize glitchiness persists.

Operating System: EndeavourOS 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon Graphics
Comment 7 Vlad Zahorodnii 2024-06-10 11:46:53 UTC
I see no glitch as on the screenshot, but wezterm reacts incorrectly to configure events. When kwin asks wezterm to maximize, it does the following

[2889903.183] xdg_toplevel#23.configure(3072, 1700, array[24])
[2889903.226] xdg_surface#22.configure(33919)
[2889903.246]  -> xdg_surface#22.ack_configure(33919)
[2889903.294]  -> xdg_surface#22.set_window_geometry(0, 0, 3072, 1700)
[2889903.729]  -> wl_surface#18.commit()

acking the configure event and immediately setting new window geometry without rendering a new frame is wrong and with some compositors, wezterm can be killed for violating the xdg-shell spec (kwin is a bit permissive in this regard).