Commit graph

104 commits

Author SHA1 Message Date
Ivailo Monev
472f24878b generic: adjust to kdelibs changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 18:38:55 +03:00
Ivailo Monev
c45dc296ab ksmserver: remove debugging bits
"KSMSERVER_STARTUP_DEBUGl" is not defined btw, drat?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-10 19:58:37 +03:00
Ivailo Monev
1cbda72fad generic: replace use of QTime as timer with QElapsedTimer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-07 12:57:37 +03:00
Ivailo Monev
c6d63798cf generic: adjust to KApplication changes
KApplication::quitOnSignal() is now called from KApplication constructor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 15:13:14 +02:00
Ivailo Monev
c920743903 ksmserver: try filename match when checking if the command is the window manager
Exec may or may not be set to full path in the .desktop file for the window
manager, still it is like brute-force guess

note that the default in KSMServer::selectWm() is just kwin (filename) but
programs are (usually) looked for first in PATH (QProcess does that now for
example)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-11 13:00:11 +02:00
Ivailo Monev
681aec5d18 ksmserver: log message when the window manager changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-10 10:30:13 +02:00
Ivailo Monev
264cb151f9 ksmserver: log backtrace in case of crash
if it crashes a startup error will be shown via `xmessage`, there will
be not window manager (most likely) at that point and many things will
not work as expected.

ksmserver cannot be restarted for example, drkonqi is not option either
because attempting to report a bug will open a browser but the backtrace
cannot be copied (the browser window will be on top of any other window
if it launches with no way to switch to the drkonqi window), etc.

in other words - the best thing that can be done is log the backtrace to
the system log (the ksmserver debug area has to be configured for that)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 12:30:31 +02:00
Ivailo Monev
5d2fc37272 ksmserver: prepare for klauncher changes
doubles as performance optimization by reusing the already created
interface (klauncherSignals member)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 05:49:36 +02:00
Ivailo Monev
37f2410331 ksmserver: explicitly compare the qstrcmp() return value with 0
still, strcmp() is not very reliable. see my test case:
https://github.com/fluxer/strcmp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 01:55:29 +02:00
Ivailo Monev
dd35263d37 ksmserver: set the default debug area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 10:21:07 +02:00
Ivailo Monev
e9335d77fc ksmserver: setup quit signals via KApplication::quitOnSignal()
note that for SIGHUP sighandler() was calling signal()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:46:37 +02:00
Ivailo Monev
594e39a043 generic: adjust to KCrash and klauncher interface changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 22:44:00 +02:00
Ivailo Monev
fcbec5f0cc generic: adjust to solid power manager changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-01 23:54:21 +02:00
Ivailo Monev
83cb186aec ksmserver: handle all currently supported power sleep methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 01:54:45 +02:00
Ivailo Monev
f00e4c99b3 ksmserver: process events until kded second phase is done
now that phase 2 is properly done (see
86082941ab933b36fb7df267f3abd2625757f4ba in kdelibs repo) it could
block for a few seconds

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 05:13:00 +02:00
Ivailo Monev
795cb31a59 generic: remove redundant HAVE_XRENDER configuration definition
if Xrender is not found a fatal message will be issued by the top-level
CMakeLists file because it is required by KWin compositor for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 00:46:00 +02:00
Ivailo Monev
29fe3a31df ksmserver: start the shutdown feedback from KSMShutdownDlg constructor and stop it on reject
ksmserver stops it when the dialog is rejected but the test did not for
example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-20 01:54:00 +02:00
Ivailo Monev
1de2f3e322 ksmserver: make KSMShutdownFeedback::stop() do the same thing as KSMShutdownFeedback::logoutCanceled()
for some reason KSMShutdownFeedback::stop() was not doing anything when the
KWin effect was taking care of the logout effect but KWin also does not
apply the effect to windows other than the one created by ksmserver

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-20 01:32:39 +02:00
Ivailo Monev
62439fb0f9 ksmserver: fix build of tests
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-20 01:16:35 +02:00
Ivailo Monev
36d3e65630 ksmserver: drop custom logout effect
the effect is very much bound to the window manager (KWin) because if
applications require attention (such as confirmation to cancel any
pending changes) their window or any dialog they pop may have to be
raised, will have to be focused and not be grayed out

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 01:37:02 +02:00
Ivailo Monev
d3da8b90b8 generic: remove redundant QT_CLEAN_NAMESPACE definitions
Katie's namespace is always clean, if there is a namespace issue perhaps
it is not cause of it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 02:07:21 +02:00
Ivailo Monev
4a34d42786 ksmserver: kill window manager before cleanup
the window manager itself may want to do something session management
related (KWin does) and as such ksmserver has to be in operational state
before the window manager is killed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 01:54:19 +02:00
Ivailo Monev
7fc137c6f2 ksmserver: move process launching code to startup source file
note that connecting to signals after the process is started (which is also
auto-deleted) as was done in KSMServer::launchWM() could result in a race

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 01:28:27 +02:00
Ivailo Monev
8b2eba7361 generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 01:41:49 +02:00
Ivailo Monev
ebadaa0c40 ksmserver: drop logout fade effect
unless compositor is not active it is not even used (KWin has logout
effect for that) and there is a curtain effect as fallback

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-07 17:30:35 +02:00
Ivailo Monev
10032daa02 generic: adjust to KSelectionOwner changes
had to rewrite KSelectionOwner to fix the issues with it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-05 08:31:02 +02:00
Ivailo Monev
4560049c4a ksmserver: startup optimization
QProcess::waitForStarted() will wait up 4000s but may return before

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-04 10:56:54 +02:00
Ivailo Monev
465db03878 ksmserver: do not attempt to run programs from autostart directory
the spec does not mention that programs should be placed there, only
.desktop files (which klauncher already handles). for reference:
https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-04 09:07:50 +02:00
Ivailo Monev
881a427576 generic: rework startup to no create a shell script
by the time ksplash gets the X11 events for startup phases the startup
process is (and should be) done, especially after the display
configuration is done and the monitor is ready to output thus ksplash
does not really indicate much

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 11:29:28 +02:00
Ivailo Monev
ad4753db4a ksmserver: start kded service in autostart zero phase
org.kde.kded service is now not started by kdeinit4 (the program that owns
org.kde.klauncher) nor by KDateTime (indirectly by KSystemTimeZones) and
that was the assumption in KSMServer. note that there is no emission for
kded phase done from ksmserver which ksplash checks for

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-25 01:46:10 +03:00
Ivailo Monev
936c69c827 generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-14 16:19:24 +03:00
Ivailo Monev
06a7d81327 generic: make use of KUser and KUserGroup
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-10 22:17:43 +03:00
Ivailo Monev
9309e637bf ksmserver: use qt4_generate_dbus_interface() macro to generate D-Bus interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-02 19:22:05 +03:00
Ivailo Monev
b0718761f3 ksmserver: set shutdown dialog window role after it has been constructed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-28 11:17:33 +03:00
Ivailo Monev
1212fc79f7 generic: adjust to authorization changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-25 19:12:57 +03:00
Ivailo Monev
27b1b53595 ksmserver: zero-initialize the gethostname() buffers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-24 19:32:05 +00:00
Ivailo Monev
e1c102d439 generic: remove checks for system headers that should be present
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 16:21:57 +03:00
Ivailo Monev
eb69384380 ksmserver: indent switch cases in KSMServer::resumeStartupInternal()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-03 17:05:42 +03:00
Ivailo Monev
072fabffb9 ksmserver: plug kcheckrunning leaks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 09:02:01 +03:00
Ivailo Monev
5c6ef488fe ksmserver: check for KDE_FULL_SESSION X11 atom from kcheckrunning
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 09:00:13 +03:00
Ivailo Monev
83ba4f993c ksmserver: oops, put back SIGPIPE to the ignored signals
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 07:37:34 +03:00
Ivailo Monev
cb5f63cc72 generic: disable session manager via SESSION_MANAGER environment variable unset too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 06:40:25 +03:00
Ivailo Monev
5927adc8c7 generic: use KApplication::quitOnSignal() in kglobaaccel, knotify4 and kuiserver to setup signals for application quit
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 02:56:49 +03:00
Ivailo Monev
232b0c4af3 generic: prepare for KStandardDirs changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-25 10:38:05 +03:00
Ivailo Monev
a506292cd5 ksmserver: format and indent kcheckrunning source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-24 06:31:32 +03:00
Ivailo Monev
87ec7d5735 libs: reimplement KDisplayManager
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-27 22:28:07 +03:00
Ivailo Monev
fcbc69b222 generic: reimplement screen saver interface via xscreensaver
my monitor is not the latest stock but it has its own screen saver
feature

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-13 01:27:15 +03:00
Ivailo Monev
0cced335a8 ksmserver: handle authentication error and abort status from kcheckpass as failure
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-12 00:46:44 +03:00
Ivailo Monev
3085d7d921 ksmserver: zero-initialize the file-descriptor buffer passed to kcheckpass
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-12 00:45:18 +03:00
Ivailo Monev
d7838b9434 ksmserver: drop boot options support 2022-04-03 20:23:35 +03:00