Changeset View
Changeset View
Standalone View
Standalone View
krfb/main.cpp
Show All 36 Lines | |||||
37 | #include <QCommandLineOption> | 37 | #include <QCommandLineOption> | ||
38 | 38 | | |||
39 | 39 | | |||
40 | static const char description[] = I18N_NOOP("VNC-compatible server to share " | 40 | static const char description[] = I18N_NOOP("VNC-compatible server to share " | ||
41 | "desktops"); | 41 | "desktops"); | ||
42 | 42 | | |||
43 | static bool checkX11Capabilities() | 43 | static bool checkX11Capabilities() | ||
44 | { | 44 | { | ||
45 | if (QApplication::platformName() != QStringLiteral("xcb")) { | ||||
pino: looking at similar checks in other applications, shouldn't this be `QX11Info::isPlatformX11()`? | |||||
46 | // XTestQueryExtension segfaults under wayland + XWayland. | ||||
pino: then most probably only the platform name check should be enough, shouldn't it? | |||||
alexeymin: Yeah, probably platform name check should be enough. | |||||
47 | // exit early and gracefully | ||||
48 | KMessageBox::error(nullptr, | ||||
49 | i18n("Desktop Sharing is not running under an X11 Server. " | ||||
50 | "Other display servers are currently not supported."), | ||||
51 | i18n("Desktop Sharing Error")); | ||||
please no exclamation marks in error messages, as they "increase the tone" of the message itself. pino: please no exclamation marks in error messages, as they "increase the tone" of the message… | |||||
alexeymin: Okay | |||||
52 | return false; | ||||
53 | } | ||||
54 | | ||||
45 | int bp1, bp2, majorv, minorv; | 55 | int bp1, bp2, majorv, minorv; | ||
46 | Bool r = XTestQueryExtension(QX11Info::display(), &bp1, &bp2, | 56 | Bool r = XTestQueryExtension(QX11Info::display(), &bp1, &bp2, | ||
47 | &majorv, &minorv); | 57 | &majorv, &minorv); | ||
48 | 58 | | |||
49 | if ((!r) || (((majorv * 1000) + minorv) < 2002)) { | 59 | if ((!r) || (((majorv * 1000) + minorv) < 2002)) { | ||
50 | KMessageBox::error(nullptr, | 60 | KMessageBox::error(nullptr, | ||
51 | i18n("Your X11 Server does not support the required XTest extension " | 61 | i18n("Your X11 Server does not support the required XTest extension " | ||
52 | "version 2.2. Sharing your desktop is not possible."), | 62 | "version 2.2. Sharing your desktop is not possible."), | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |
looking at similar checks in other applications, shouldn't this be QX11Info::isPlatformX11()?