Skip to content

Quit kwin_x11 on dbus disconnection

ivz hh requested to merge ivzhh/kwin:master into master

Kwin exits when KSelectionOwner loses ownership. But a different code path is found in site. Kwin receives Disconnected signal from interface org.freedesktop.DBus.Local before losing ownership. In this situation, kwin won't exit and won't unregister service org.kde.KWin properly. Although this service will be automatically removed from dbus after a while, disconnected signal may not properly get triggered.

Startkde exits without checking whether kwin exits or not. X server quits right after startkde. Kwin gets timestamp by sending a dummy message to X server and if X server is gone, kwin then gets trapped in indefinite loop.

An easy way to reproduce this problem is through Xrdp. Xrdp starts Xvnc as X server and executes startkde. If click "log out" in KDE, startkde exits and therefore Xrdp terminates Xvnc. Kwin then keeps running in indefinite loop of getTimeStamp.

This commit adds another exiting condition for kwin_x11: on dbus disconnected. This can help solving the kwin_x11 indefinite loop issue.

I have posted background story to several places:

I made another patch to work with this one to plasma workspace: merge-request #439

BUG 415008

BUG 428817

Edited by ivz hh

Merge request reports