Skip to content

Launch Lazarus through Xwayland under WSLg - #3

Merged
Moonbot-Tech merged 1 commit into
mainfrom
fix/lazarus-wslg-x11
Oct 27, 2026
Merged

Moonbot-Tech merged 1 commit into
mainfrom
fix/lazarus-wslg-x11

Conversation

@Cooler2

@Cooler2 Cooler2 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

The WSLg compositor (weston, WSLg 1.0.79) crashes with SIGSEGV when a window that has a transient child is destroyed. By default GTK3 talks to it directly over Wayland. The IDE's first-run setup dialog does exactly this: its parent window is destroyed while the dialog is transient for it. The next window close then brings down the compositor, and every Linux window of the session disappears together with the IDE. A plain GTK3 program reproduces the crash without Lazarus: show a window set_transient_for(parent), then call parent.destroy(). Xwayland is not affected.

./lazarus now selects GDK_BACKEND=x11 when /mnt/wslg exists and the user has not chosen a backend. An explicit GDK_BACKEND, including wayland, is kept.

Verified on WSL2 Ubuntu 24.04 with WSLg 1.0.79:

  • First run on an empty IDE configuration: before the change the compositor crashed 2 of 2 times, after it the IDE stays up past the setup scan.
  • The launcher logic was checked with GDK_BACKEND unset, empty, wayland and x11,wayland.

The WSLg compositor (weston, WSLg 1.0.79) crashes with SIGSEGV when a
window that has a transient child is destroyed. GTK3 talks to it directly
over Wayland by default, and the IDE's first-run setup does exactly this,
so every Linux window in the session disappears together with the IDE.
A plain GTK3 program reproduces the crash; Xwayland is not affected.

Select GDK_BACKEND=x11 when /mnt/wslg exists and the user has not chosen a
backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Moonbot-Tech
Moonbot-Tech merged commit 1c7f927 into main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants