Skip to content

Fix Wayland window creation to comply with Weston 15 xdg-shell protocol#69

Open
pleasurefish wants to merge 1 commit into
ARM-software:masterfrom
pleasurefish:master
Open

Fix Wayland window creation to comply with Weston 15 xdg-shell protocol#69
pleasurefish wants to merge 1 commit into
ARM-software:masterfrom
pleasurefish:master

Conversation

@pleasurefish
Copy link
Copy Markdown

The previous implementation did not properly follow the xdg-shell configure/commit flow required by Weston 15, causing window creation and resize operations to fail.

Changes:

  • Add xdg_toplevel_listener to handle configure events with width/height parameters
  • Implement proper configure/ack/commit sequence for window initialization
  • Add mConfigured flag to track surface configuration state
  • Wait for configure event before proceeding with window show/resize operations
  • Move callback function implementations after WaylandWindow class definition to resolve forward declaration issues

The correct flow is now:

  1. Request state change (set_fullscreen/unset_fullscreen)
  2. Commit surface (wl_surface_commit)
  3. Wait for configure event from compositor
  4. Acknowledge configure (xdg_surface_ack_configure)
  5. Proceed with rendering

This ensures compatibility with Weston 15's stricter xdg-shell protocol enforcement where surfaces must be configured before they can be displayed.

The previous implementation did not properly follow the xdg-shell configure/commit
flow required by Weston 15, causing window creation and resize operations to fail.

Changes:
- Add xdg_toplevel_listener to handle configure events with width/height parameters
- Implement proper configure/ack/commit sequence for window initialization
- Add mConfigured flag to track surface configuration state
- Wait for configure event before proceeding with window show/resize operations
- Move callback function implementations after WaylandWindow class definition to
  resolve forward declaration issues

The correct flow is now:
1. Request state change (set_fullscreen/unset_fullscreen)
2. Commit surface (wl_surface_commit)
3. Wait for configure event from compositor
4. Acknowledge configure (xdg_surface_ack_configure)
5. Proceed with rendering

This ensures compatibility with Weston 15's stricter xdg-shell protocol enforcement
where surfaces must be configured before they can be displayed.

Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
@kexia01
Copy link
Copy Markdown
Contributor

kexia01 commented May 18, 2026

Thanks for your contribution! We will look at it and test it.
Merge this internally and add it to the next release if pass.

@pleasurefish
Copy link
Copy Markdown
Author

thanks for your information, looking forward to your update.

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.

3 participants