mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-03 16:32:22 +00:00
fix(wayland): pass on an unclassified capture error instead of "x11 expected"
Every portal handshake failure is tagged and gets its own message, so the untagged errors that still reach this fallback at login are internal ones (GStreamer init, a poisoned lock). Reporting them as "x11 expected" sent users off to switch to X11 for faults X11 does not fix, and hid the real error. Send the error itself, as the Ubuntu 21+ branch already does. No regression test: CI runs on Ubuntu 24.04, where map_err_scrap takes the Ubuntu branch and returns the raw error both before and after this change. Refs #16829 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41f182e636
commit
beeeef14f0
1 file changed
+4
-2
@@ -12,7 +12,7 @@ use std::io;
|
||||
use crate::{
|
||||
client::{
|
||||
SCRAP_OTHER_VERSION_OR_X11_REQUIRED, SCRAP_UBUNTU_HIGHER_REQUIRED,
|
||||
SCRAP_X11_REQUIRED, SCRAP_XDP_PORTAL_UNAVAILABLE,
|
||||
SCRAP_XDP_PORTAL_UNAVAILABLE,
|
||||
},
|
||||
platform::linux::is_x11,
|
||||
};
|
||||
@@ -82,7 +82,9 @@ fn map_err_scrap(err: String) -> io::Error {
|
||||
} else if err_lower.contains("pipewire") {
|
||||
io::Error::new(io::ErrorKind::Other, SCRAP_OTHER_VERSION_OR_X11_REQUIRED)
|
||||
} else {
|
||||
io::Error::new(io::ErrorKind::Other, SCRAP_X11_REQUIRED)
|
||||
// Unclassified, so say what failed: "x11 expected" sent users off to switch to X11
|
||||
// for faults X11 does not fix (#16829).
|
||||
io::Error::new(io::ErrorKind::Other, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user