Skip to content

Commit fa5be60

Browse files
committed
wayland: Move followup roundtrip out of registry::global
1 parent 6fc0e56 commit fa5be60

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

gfx/common/wayland_common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,9 @@ bool gfx_ctx_wl_init_common(
755755

756756
wl->registry = wl_display_get_registry(wl->input.dpy);
757757
wl_registry_add_listener(wl->registry, &registry_listener, wl);
758+
/* first roundtrip to bind compositor globals */
759+
wl_display_roundtrip(wl->input.dpy);
760+
/* second roundtrip for listeners on bound globals (wl_output, wl_seat) */
758761
wl_display_roundtrip(wl->input.dpy);
759762

760763
if (!wl->compositor)

input/common/wayland_common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ static void wl_registry_handle_global(void *data, struct wl_registry *reg,
755755
id, &wl_output_interface, MIN(version, 2));
756756
wl_output_add_listener(oi->output, &output_listener, oi);
757757
wl_list_insert(&wl->all_outputs, &od->link);
758-
wl_display_roundtrip(wl->input.dpy);
759758
}
760759
else if (string_is_equal(interface, xdg_wm_base_interface.name) && found++)
761760
wl->xdg_shell = (struct xdg_wm_base*)

0 commit comments

Comments
 (0)