ui/app: (wayland) expand comments for double server roundtrip

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-30 13:38:58 +02:00
parent ea2ee1abcc
commit 110da804a0
+5 -2
View File
@@ -1118,9 +1118,12 @@ func waylandConnect() error {
return errors.New("wayland: wl_display_get_registry failed") return errors.New("wayland: wl_display_get_registry failed")
} }
C.gio_wl_registry_add_listener(reg) 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) 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) C.wl_display_roundtrip(c.disp)
if c.compositor == nil { if c.compositor == nil {
c.destroy() c.destroy()