Summary: | Logout (and shutdown, reboot) close plasma but don't log out | ||
---|---|---|---|
Product: | [Unmaintained] ksmserver | Reporter: | Jeremy Whiting <jpwhiting> |
Component: | general | Assignee: | Lubos Lunak <l.lunak> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hein, yuking_net |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/konversation/93b4fc6073bfdfcd3d7bd466fc2d4cbbadec0445 | Version Fixed In: | |
Sentry Crash Report: |
Description
Jeremy Whiting
2014-09-18 18:25:18 UTC
Similar with me, when i click the logout / reboot /shutdown items, kde will do nothing I did a bit more digging today and found some messages in my journalctl saying: kdeinit5[9146]: ksmserver: Client "/usr/local/bin/konversation" ( 10d068726f000141188100400000091460022 ) canceled shutdown. So I tried quitting konversation before doing the logout or reboot or shutdown action from the "Application Menu" and found that if konversation isn't running, logout works fine, but if konversation is running it requires being called twice as described in the original post. I tried to investigate further to see why konversation is cancelling the shutdown but found nothing in the konversation sources about QSessionManager or anything related to ICE messages or session management, so am not sure how/why konversation is doing this. I tested with other applications that use a KTextBrowser like konversation (ktextbrowser kdelibs4support test) and logout worked fine with that running. I also tested with dolphin and konsole etc. but had no issues with any application besides konversation itself. Ok, I dove a bit deeper into konversation's code, and I think I found the problem. Konversation's MainWindow::queryClose checks KUnqueApplication::sessionSaving to decide if it should close or not but KApplication isn't setting it's d->session_saving since QApplication::commitData isn't used anymore (I added a slot to call commitData, connected it to QApplication::commitDataRequest but even then our commitData sets then unsets session_saving before the application gets the queryClose called. So either kdelibs4support's d->session_saving needs some love so it is set appropriately for applications that still use it to act accordingly, or konversation needs to just use QApplication and ask it if the session manager is closing it, etc. http://qt-project.org/doc/qt-5/sourcebreaks.html <-- mentions commitData getting deprecated, which explains why our KApplication::commitData isn't getting called. FWIW we plan to port to QApplication (KUniqueApplication is at this point almost our last kdelibs4support dep) and already have a topic branch for it, it's just taking a bit longer because we're a somewhat more advanced user of that ballpark of classes (e.g. we support in-place self-restarts of the app with CLI argument roundtripping). IMHO trying to fix KApplication is still needed because make no mistake, Konvi will be one of the first apps to drop it - plenty of other apps are still KApps. A fix while the port to QApplication is still happening on https://git.reviewboard.kde.org/r/120427/ which solves the issue here. Git commit 93b4fc6073bfdfcd3d7bd466fc2d4cbbadec0445 by Jeremy Whiting. Committed on 29/09/2014 at 20:03. Pushed by whiting into branch 'frameworks'. Fix session quit handling by not using deprecated sessionSaving method. REVIEW:120427 M +1 -1 src/mainwindow.cpp http://commits.kde.org/konversation/93b4fc6073bfdfcd3d7bd466fc2d4cbbadec0445 |