Skip to content

Don't send wl_output.done() to clients that bind to v1 - #2207

Open
djmaze wants to merge 1 commit into
Smithay:masterfrom
djmaze:fix_wl_output_v1
Open

djmaze wants to merge 1 commit into
Smithay:masterfrom
djmaze:fix_wl_output_v1

Conversation

@djmaze

@djmaze djmaze commented Oct 11, 2026

Copy link
Copy Markdown

Description

In XdgOutput::add_instance, only send wl_output.done() to clients that bind to version 2 of wl_output at least.

Clients using version 1 (e.g. GTK3 apps) without a done listener will crash with the following error otherwise:

listener function for opcode 2 of wl_output is NULL

Observed with the Immersed desktop app on niri, and the same abort is reported against cosmic-comp in pop-os/cosmic-epoch#1137.

I also have a repro harness if interested.

(Disclaimer: I used an AI harness in order to find the problem and suggest a fix.)

Checklist

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

Comment thread src/wayland/output/xdg.rs

wl_output.done();
// wl_output.done() only exists since wl_output version 2
if wl_output.version() >= 2 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comment and import/use the self-explaining wayland_server::protocol::wl_output::EVT_DONE_SINCE instead please.

This branch has not been deployed

No deployments
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