psi-im / psi

XMPP client
https://psi-im.org/
Other
406 stars 122 forks source link

Psi 1.5 is not compatible with wayland #694

Open pinaraf opened 2 years ago

pinaraf commented 2 years ago

Using Psi 1.5 under wayland leads to crashes through the focus stealing prevention code. This code was removed from psi+ in commit e155a9d8a06f08efe35e44a56dd84f663d903bdc but this commit did not reach the psi 1.5 release.

OS: Debian with KDE Plasma Wayland

Psi Version: 1.5

In case of app crash please provide back trace (start debug version in gdb).

#0  0x00007ffff7e3f827 in xcb_send_request_with_fds64 () from /lib/x86_64-linux-gnu/libxcb.so.1
#1  0x00007ffff7e40199 in xcb_send_request () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007ffff7e46df9 in xcb_delete_property () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00005555559ab26d in PsiApplication::notify (this=0x7fffffffdce0, receiver=0x555556169b30, event=0x7fffffffca00) at ./src/psiapplication.cpp:372
#4  0x00007ffff7120aca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff66d9415 in QWidgetPrivate::hide_helper() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff66de1d8 in QWidgetPrivate::setVisible(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff67acdfb in QComboBox::hidePopup() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff67a3751 in QComboBoxPrivateContainer::mousePressEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff66de4ce in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff678a87e in QFrame::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff669c6bf in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff66a41c4 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff7120aca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff66a2cd3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
pinaraf commented 2 years ago

Note : the HAVE_X11 wrapping code is wrong. Qt can be compiled for both X11 and Wayland, thus HAVE_X11=1 while running without X11.

Ri0n commented 2 years ago

Thanks for the report. We are not planning to further support 1.x branch. So for now one can use a nightly build till 2.0 is released.

And yes I agree we need more dynamic detection and not HAVE_X11.

WhyNotHugo commented 10 months ago

Latest master (83a8dfb87ad0b882be49fd43de75c805464a8c2b) builds and works fine for me on swaywm on Alpine.

doas apk add -t .psi-deps cmake qt5-qtbase-dev qca-dev qt5-qtmultimedia-dev qt5-qtsvg-dev qt5-qtx11extras-dev hunspell-dev
cmake -B builddir -DUSE_XSS=no
make -C builddir -j4
doas make -C builddir install DESTDIR=/
Vitozz commented 10 months ago

If you have screenshotplugin or videostatusplugin enabled you should disable both of them. Night versions works well with wayland without these plugins. Try USE_X11=OFF cmake flag.

Ri0n commented 6 months ago

USE_X11=OFF is not required. probably just plugins. probably we should add platformName() checks there.

woj-tek commented 6 months ago

So for now one can use a nightly build till 2.0 is released.

Hi, sorry to be that guy but do you have plans for 2.0 release (apart from https://github.com/psi-im/psi/milestone/3)? Or "it will be ready when it's ready"?

(Somewhat related to https://github.com/psi-plus/maintenance/issues/22)