Commit 44560af0 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson

xwayland: process Wayland events after adding screen

When we're done adding a new screen, we need to process any pending
Wayland events again.

Hence we don't end up processing xdg_output events unexpectedly when
glamor is disabled. Be that because "-shm" was passed or "-eglstream"
has failed.

Failing to do that could lead to a crash at startup:

    Xwayland: dixGetPrivateAddr: Assertion `key->initialized' failed.
    (EE) Backtrace:
    (EE) 0: Xwayland (OsSigHandler)
    (EE) 1: (funlockfile)
    (EE) 2: (gsignal)
    (EE) 3: (abort)
    (EE) 4: (?+0x0)
    (EE) 5: (__assert_fail)
    (EE) 6: Xwayland (dixGetPrivateAddr)
    (EE) 7: Xwayland (_fbGetWindowPixmap)
    (EE) 8: Xwayland (getDrawableDamageRef)
    (EE) 9: Xwayland (damageRegionProcessPending)
    (EE) 10: Xwayland (damagePolyFillRect)
    (EE) 11: Xwayland (miPaintWindow)
    (EE) 12: Xwayland (miWindowExposures)
    (EE) 13: Xwayland (miHandleValidateExposures)
    (EE) 14: Xwayland (SetRootClip)
    (EE) 15: Xwayland (update_screen_size)
    (EE) 16: Xwayland (apply_output_change)
    (EE) 17: (ffi_call_unix64)
    (EE) 18: (ffi_call)
    (EE) 19: (wl_log_set_handler_client)
    (EE) 20: (_init)
    (EE) 21: (wl_display_dispatch_queue_pending)
    (EE) 22: (wl_display_roundtrip_queue)
    (EE) 23: Xwayland (InitInput)
    (EE) 24: Xwayland (dix_main)
    (EE) 25: (__libc_start_main)
    (EE) 26: Xwayland (_start)
    Fatal server error:
    (EE) Caught signal 6 (Aborted). Server aborting
    Aborted (core dumped)
Signed-off-by: default avatarOlivier Fourdan <>
Reviewed-by: Lyude Paul's avatarLyude Paul <>
Reviewed-by: default avatarEmil Velikov <>
parent dbde3fec
......@@ -1132,6 +1132,10 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
AddCallback(&PropertyStateCallback, xwl_property_callback, pScreen);
while (xwl_screen->expecting_event)
return ret;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment