Sadly, XTestQueryExtension just segfaults under wayland.
Avoid it by detecting QPA used.
BUG: 406599
aacid | |
kossebau | |
jgrulich | |
pino | |
ngraham |
KDE Applications |
Sadly, XTestQueryExtension just segfaults under wayland.
Avoid it by detecting QPA used.
BUG: 406599
Nice error message when running in Wayland session.
Still works in X11
No Linters Available |
No Unit Test Coverage |
Buildable 11917 | |
Build 11935: arc lint + arc unit |
krfb/main.cpp | ||
---|---|---|
45–46 | then most probably only the platform name check should be enough, shouldn't it? | |
50–51 | please no exclamation marks in error messages, as they "increase the tone" of the message itself. |
@pino thanks for looking at this! Fixed your comments.
The more I use wayland, the more I think it was designed not to help users, but to cause more pain.
You cannot (easily) grab screen on wayland, and you cannot emulate global user input, so vnc server on wayland is hardly possible. I know, there is D20402, but it is still not done, and even with that pile of layers just to get screen contents, input emulation problem is still not solved ( https://phabricator.kde.org/D18115#389996 ).
krfb/main.cpp | ||
---|---|---|
45 | looking at similar checks in other applications, shouldn't this be QX11Info::isPlatformX11()? |
Yeah, you are right, QX11Info::isPlatformX11() does exactly that - https://code.qt.io/cgit/qt/qtx11extras.git/tree/src/x11extras/qx11info_x11.cpp#n98 .
Done :)
Of course, I've tested it with both X11 and wayland. In wayland the error message pops up as expected:
FYI without this patch the stack trace to SIGSEGV looks like this:
Thread 1 (Thread 0x7f607c898100 (LWP 4022)): [KCrash Handler] #7 0x00007f6077eb3d30 in _DYNAMIC () from /usr/lib64/libQt5DBus.so.5 #8 0x00007f607bfd8b0f in _XSend (dpy=dpy@entry=0x560414309f40, data=data@entry=0x0, size=size@entry=0) at /var/tmp/portage/x11-libs/libX11-1.6.7/work/libX11-1.6.7/src/xcb_io.c:496 #9 0x00007f607bfd8e80 in _XFlush (dpy=0x560414309f40) at /var/tmp/portage/x11-libs/libX11-1.6.7/work/libX11-1.6.7/src/xcb_io.c:516 #10 0x00007f607bfdba25 in _XGetRequest (dpy=dpy@entry=0x560414309f40, type=type@entry=98 'b', len=len@entry=8) at /var/tmp/portage/x11-libs/libX11-1.6.7/work/libX11-1.6.7/src/XlibInt.c:1717 #11 0x00007f607bfcf13d in XQueryExtension (dpy=dpy@entry=0x560414309f40, name=name@entry=0x7f607ab42fe0 "XInputExtension", major_opcode=major_opcode@entry=0x7ffca078b2cc, first_event=first_event@entry=0x7ffca078b2d0, first_error=first_error@entry=0x7ffca078b2d4) at /var/tmp/portage/x11-libs/libX11-1.6.7/work/libX11-1.6.7/src/QuExt.c:44 #12 0x00007f607ab42056 in get_xinput_base (dpy=0x560414309f40) at /var/tmp/portage/x11-libs/libXtst-1.2.3-r1/work/libXtst-1.2.3/src/XTest.c:79 #13 find_display (dpy=0x560414309f40) at /var/tmp/portage/x11-libs/libXtst-1.2.3-r1/work/libXtst-1.2.3/src/XTest.c:83 #14 0x00007f607ab42232 in XTestQueryExtension (dpy=0x560414309f40, event_base_return=0x7ffca078b3bc, error_base_return=0x7ffca078b3c8, major_return=0x7ffca078b3d0, minor_return=0x7ffca078b3e8) at /var/tmp/portage/x11-libs/libXtst-1.2.3-r1/work/libXtst-1.2.3/src/XTest.c:101 #15 0x0000560412579253 in main ()
P.S. If I uderstand it right, this change goes to master and not to Applications/19.04 because of the new translatable string added, though it is only bug fix?
There are three options (at least that I see):
Choose one...