Description
When resizing the window on WSLg (Windows Subsystem for Linux GUI), a ghost/overlay artifact appears that looks like the outline of the previous window border/frame. This artifact persists even after clicking on the title bar.
Environment
- Platform: WSLg (WSL2 with GUI support)
- Wayland compositor via WSLg
- wgpu with OpenGL ES backend
Steps to Reproduce
- Run the application on WSLg
- Resize the window by dragging edges or corners
- Observe ghost border artifact overlay
Attempted Fixes
- Added
device.poll(Maintain::Wait) before recreating textures on resize
- Added check to skip resize if dimensions unchanged
- Tried disabling MSAA (did not help)
- Added ScaleFactorChanged event handling (did not help)
- Tried adding explicit clear pass before MSAA resolve (caused crashes)
Current Workaround
Window starts maximized by default to avoid the issue.
Notes
This appears to be a compositor-level issue with WSLg/Wayland, not a wgpu rendering issue. The window decorations are drawn by the system compositor, and the artifact looks like stale compositor-level content.
Related Code
src/render/pipeline.rs: resize() function
src/main.rs: WindowEvent::Resized handler
Description
When resizing the window on WSLg (Windows Subsystem for Linux GUI), a ghost/overlay artifact appears that looks like the outline of the previous window border/frame. This artifact persists even after clicking on the title bar.
Environment
Steps to Reproduce
Attempted Fixes
device.poll(Maintain::Wait)before recreating textures on resizeCurrent Workaround
Window starts maximized by default to avoid the issue.
Notes
This appears to be a compositor-level issue with WSLg/Wayland, not a wgpu rendering issue. The window decorations are drawn by the system compositor, and the artifact looks like stale compositor-level content.
Related Code
src/render/pipeline.rs:resize()functionsrc/main.rs:WindowEvent::Resizedhandler