Skip to content

Window resize leaves ghost border overlay artifact on WSLg #25

@pjt222

Description

@pjt222

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

  1. Run the application on WSLg
  2. Resize the window by dragging edges or corners
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions