https://bugs.kde.org/show_bug.cgi?id=487616

Fernando <biazi.eng.br+...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |biazi.eng.br+...@gmail.com

--- Comment #10 from Fernando <biazi.eng.br+...@gmail.com> ---
In favor of software quality, there should be no dependency of states or data
comming from other programs, in this case, independenttly of only supporting
one window manager. This does not mean not taking advantage of them.

What do you tink of testing if kwin is running before calling the
closeWaylandWindows method?
I don't know the correct way to do it. It seems wrong to search fot the
executable name, but this is what I know how to do. I can share the patch
anyway if anyone wants. Also I am not a C/C++ programmer.
I did the change bellow with good results on "<src
plasma-workspace>/startkde/plasma-shutdown/shutdown.cpp" inside "void
Shutdown::ksmServerComplete()" (added lines start with "+" and preexisting
ones, only with extra spaces, start with "="):

+    QProcess procKwinRunninTest; // Declare the proccess variable to test if
kwin is running
+    procKwinRunninTest.start("pidof", QStringList() << "kwin_x11" <<
"kwin_wayland"); // Run the program to search for the pids
+    if (!procKwinRunninTest.waitForFinished(1000) ||
!procKwinRunninTest.readAllStandardOutput().trimmed().isEmpty()) {
+        // If test didn't finish, assumes running. If result not empty, kwin
is running.
=        OrgKdeKWinSessionInterface
kwinInterface(QStringLiteral("org.kde.KWin"), QStringLiteral("/Session"),
QDBusConnection::sessionBus());
 ... // Existing stuff, now only executed when a kwin process is running
=        });
+    } else {
+        logoutComplete();
+    }
=}

What it adds to the code: If kwin is not  running, don't try to connect and
communicate, just call logoutComplete, as the calls that could fail are not
needed because there is no kwin.

It would be nice if someone know how to test it in a better way.

Now it seems that I have the same problem with ksplash that I didn't find how
to solve. I would appreciate directions on it.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to