mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
Do not crash on wayland, gracefully exit with error instead
Summary:
Sadly, XTestQueryExtension just segfaults under wayland.
Avoid it by detecting QPA used.
BUG: 406599
Test Plan:
Nice error message when running in Wayland session.
{F6833467}
Still works in X11
{F6833069}
Reviewers: aacid, kossebau, jgrulich, #kde_applications, pino, ngraham
Reviewed By: pino
Subscribers: pino, ngraham
Tags: #kde_applications
Differential Revision: https://phabricator.kde.org/D21267
This commit is contained in:
@@ -121,13 +121,21 @@ int main(int argc, char *argv[])
|
||||
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
|
||||
if (!checkX11Capabilities()) {
|
||||
if (QX11Info::isPlatformX11()) {
|
||||
if (!checkX11Capabilities()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// upgrade the configuration
|
||||
checkOldX11PluginConfig();
|
||||
} else {
|
||||
KMessageBox::error(nullptr,
|
||||
i18n("Desktop Sharing is not running under an X11 Server. "
|
||||
"Other display servers are currently not supported."),
|
||||
i18n("Desktop Sharing Error"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// upgrade the configuration
|
||||
checkOldX11PluginConfig();
|
||||
|
||||
//init the core
|
||||
InvitationsRfbServer::init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user