internal/wayland: improve error handling

Note: wl_registry_add_listener is undocumented everywhere. Its implementation calls wl_proxy_add_listener which returns 0 on success or -1 on failure.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-15 21:26:31 +09:00
parent 41b49137a8
commit 12751932d1
5 changed files with 228 additions and 35 deletions

View File

@@ -40,6 +40,10 @@ func (e *OpError) Error() string {
}
func (e *OpError) Message() string {
if m, ok := message.GetMessage(e.Err); ok {
return m
}
switch {
case e.Msg != "":
return e.Error()