<request name="set_window_geometry">
<description summary="set the new window geometry">
The window geometry of a window is its "visible bounds" from the user's perspective. It includes title bars and borders if they are drawn by the client, but excludes drop shadows. The geometry is double-buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
**A client cannot set the window geometry of a maximized or fullscreen window, as the window dimensions are determined by the compositor.**
When applied, the effective window geometry will be the rectangular region of the visible area of the window.
</description>
<!-- ... -->
</request>
In the Wayland protocol, the compositor determines the size of a maximized window, and the client must adhere to this size. If a client attempts to change the size of a maximized window, it is considered a protocol violation, resulting in an error.
When trying to restore the window to the saved size, a resize attempt is made.
This leads to a surface mismatch, causing the display server to terminate.
Expected behavior
The window restoration logic should match the inner size and the window size when in the maximized state on Wayland.
Platform and Versions (please complete the following information):
OS: WSL, ubuntu 22.04
Rustc: 1.71.0
Additional context
In my opinion, it seems necessary to modify the resize-related code in window.rs or event_loop.rs within the tao source code for Linux. I'd be happy to work on a fix for this issue if you think it's appropriate.
Describe the bug
I'm encountering a Wayland protocol error when restoring a maximized window state using tauri-plugin-window-state plugin on WSL. This issue is based on https://github.com/gitbutlerapp/gitbutler/pull/4864 and the xdg-shell.xml specification.
According to the xdg-shell.xml specification:
In the Wayland protocol, the compositor determines the size of a maximized window, and the client must adhere to this size. If a client attempts to change the size of a maximized window, it is considered a protocol violation, resulting in an error.
Steps To Reproduce
https://github.com/gitbutlerapp/gitbutler/issues/4039 https://github.com/tauri-apps/tauri/issues/10702
Expected behavior
The window restoration logic should match the inner size and the window size when in the maximized state on Wayland.
Platform and Versions (please complete the following information):
OS: WSL, ubuntu 22.04 Rustc: 1.71.0
Additional context
In my opinion, it seems necessary to modify the resize-related code in
window.rs
orevent_loop.rs
within the tao source code for Linux. I'd be happy to work on a fix for this issue if you think it's appropriate.