From 110da804a0114a9fc18c40fa5f435ec2c30fa283 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 30 Aug 2019 13:38:58 +0200 Subject: [PATCH] ui/app: (wayland) expand comments for double server roundtrip Signed-off-by: Elias Naur --- ui/app/os_wayland.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/app/os_wayland.go b/ui/app/os_wayland.go index 29544591..9e1af02c 100644 --- a/ui/app/os_wayland.go +++ b/ui/app/os_wayland.go @@ -1118,9 +1118,12 @@ func waylandConnect() error { return errors.New("wayland: wl_display_get_registry failed") } C.gio_wl_registry_add_listener(reg) - // Get globals. + // Wait for the server to register all its globals to the + // registry listener (gio_onRegistryGlobal). C.wl_display_roundtrip(c.disp) - // Get output configurations. + // Configuration listeners are added to outputs by gio_onRegistryGlobal. + // We need another roundtrip to get the initial output configurations + // through the gio_onOutput* callbacks. C.wl_display_roundtrip(c.disp) if c.compositor == nil { c.destroy()