Skip to content

backend-wayland: replace a nested wl_display_roundtrip call

M. Stoeckl requested to merge mstoeckl/weston:remove-nested-roundtrip into main

Calling wl_display_roundtrip from an event handler is bad practice for a number of reasons:

  • Makes it difficult to follow the order of events and debug surrounding code
  • Makes starting the program slower
  • Makes it possible to overflow the stack, if messages read during the wl_display_roundtrip call lead to another invocation of wl_display_roundtrip.

This change may fix a failure to start when running Weston nested under Sway, but I don't yet know what exactly caused that problem.

See also commit message.

Edited by M. Stoeckl

Merge request reports

Loading