app/internal/window: add errno to wl_display_connect errors

Updates #40

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-01-03 11:28:53 +01:00
parent 3dd7c8121c
commit 95903aafda
+2 -2
View File
@@ -1089,10 +1089,10 @@ func waylandConnect() error {
return fmt.Errorf("wayland: %v", err) return fmt.Errorf("wayland: %v", err)
} }
c.xkb = xkb c.xkb = xkb
c.disp = C.wl_display_connect(nil) c.disp, err = C.wl_display_connect(nil)
if c.disp == nil { if c.disp == nil {
c.destroy() c.destroy()
return errors.New("wayland: wl_display_connect failed") return fmt.Errorf("wayland: wl_display_connect failed: %v", err)
} }
reg := C.wl_display_get_registry(c.disp) reg := C.wl_display_get_registry(c.disp)
if reg == nil { if reg == nil {