Commit graph

122 commits

Author SHA1 Message Date
Ivailo Monev
0e0db0b815 kdeui: move session management to KApplicaiton
every comment about X11 and session management in general claims it was
broken, not going to claim otherwise. everything that does not use
KApplication shall not be involved into session management now and gets
the middle finger (SIGTERM or SIGKILL) after 5 sec by klauncher when the
session is done

also session management has to be explicitly enabled by applications
now, disabled by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:29:51 +03:00
Ivailo Monev
b8d4dc0dc4 generic: call static KStandardDirs methods as such
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 02:04:03 +03:00
Ivailo Monev
302a470d3b kded: drop unused window registration feature
no point in passing around windows to kded4 or its modules, job UI delegate
windows are different thing tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 15:45:36 +03:00
Ivailo Monev
93c35e4c15 generic: remove build-time compat options
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 19:57:19 +03:00
Ivailo Monev
e482da9067 kded: rework phases logic to take any desktop session into account
much like XDG autostart except for KDED modules, requires adjustments to
modules that are automatically loaded in phase-1

in the future the logic may apply not only to modules during startup but
also when attempting to load a module in general

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 23:01:34 +03:00
Ivailo Monev
e741648f6e kded: do not assume prefixing the menu with XDG_MENU_PREFIX will result in valid menu file
if the menu file is uninstalled for example but XDG_MENU_PREFIX is still
set the menu becomes invalid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 08:41:27 +07:00
Ivailo Monev
0220b5bd85 kded: consistent headers inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 17:17:42 +03:00
Ivailo Monev
c73567cb65 kded: log the error string when module fails to load
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 09:50:52 +03:00
Ivailo Monev
3380664558 kded: Kded::updateDirWatch() optimization
KDirWatch already checks if the path is added and appends trailing slash
as neccessary

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 13:15:55 +03:00
Ivailo Monev
5290bf44e0 kdecore: deal with KMimeType TODO
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 19:51:10 +03:00
Ivailo Monev
5613e5483c generic: remove redundant build varibles
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 20:25:52 +03:00
Ivailo Monev
36c910c653 generic: move stuff from KDE4Internal module to KDELibs4Config
large-scale changes to the build system, nothing a user sees tho - it is
all under the hood

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 19:01:40 +03:00
Ivailo Monev
38e370d475 kdeui: new KApplication::quitOnDisconnected() method, also setup quit signal handler by default
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 15:09:48 +02:00
Ivailo Monev
5d2bbf9b77 kded: apply XDG_MENU_PREFIX only to the main applications menu file
the spec documents it only for use with the applications menu file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-22 13:22:22 +02:00
Ivailo Monev
890dfa808d kded: prefix the applications menu with kde-
according to the spec it may be prefixed, if it is XDG_MENU_PREFIX must
be exported (which matters not to Katana since the main application menu
file is hardcoded anyway). for reference:
https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-22 01:08:35 +02:00
Ivailo Monev
a4ac5fbb46 kded: do not deep-copy QString objects when iterating
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-22 01:03:54 +02:00
Ivailo Monev
e921df61cf kdecore: implement option to recurse into sub-directories from KDirWatch::addDir()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 11:47:56 +02:00
Ivailo Monev
03aba012a0 kdecore: KDirWatch rewrite
I rewrote QFileSystemWatcher some time ago for it to be able to watch
non-existing directories, did rewrite KDirWatch too to not use FAM
and inotify making the created() and deleted() signals non-operational
(with the plan to maybe implement them in QFileSystemWatcher but that
will be hack-ish for directories with stat()-based implementation)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 00:24:49 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
86082941ab kded: load service modules in defined order
previously autoloaded modules would be loaded in arbitrary order regardless
of what phase they are ment for from Kded::initModules() but phase two
should be done by ksmserver

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 20:51:10 +02:00
Ivailo Monev
b6d30b98fb kded: update examples in HOWTO
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 20:10:39 +02:00
Ivailo Monev
bab2e1b6e4 kded: log the kde_running variable value
if it is false then modules that are not ment for full session are not
automatically loaded on init so it shall serve as a hint when debugging

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 20:01:24 +02:00
Ivailo Monev
9b41127ecb generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 00:40:18 +02:00
Ivailo Monev
2178afec68 kded: do not send notification to ksplash
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 11:36:22 +02:00
Ivailo Monev
107dd27063 kded: crash fix for the case when QT_FOREACH_COMPAT is not defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-27 11:24:55 +03:00
Ivailo Monev
8ece51a7ca generic: correct reference to kbuildsycoca4 debug area
7012 is not reserved for anything

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-22 23:40:03 +03:00
Ivailo Monev
692ca38cef kded: correct debug message area code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-22 20:18:48 +03:00
Ivailo Monev
8b6b95c41c generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-18 04:06:17 +03:00
Ivailo Monev
68cae26289 kded: look for kdontchangethehostname program via KStandardDirs::findExe()
kdontchangethehostname is not in PATH, it is installed (usually) as
/usr/lib/kde4/kdontchangethehostname and QProcess::execute() will not find
it if the full path is not passed to it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 00:52:58 +03:00
Ivailo Monev
b6671dbbac kded: merge KHostnameD class into Kded class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 00:47:25 +03:00
Ivailo Monev
ea9b5d7ade cmake: new baseline kde4_add_dbus_service() macro replacing dbus_add_activation_service()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 14:58:58 +03:00
Ivailo Monev
01368b3d51 kded: use the correct variable for binaries installation path in D-Bus service file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 14:19:28 +03:00
Ivailo Monev
0acab94cc6 kded: do not deep-copy QString objects when iterating
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-21 18:16:00 +03:00
Ivailo Monev
b80d7fad38 kded: store sycoca path as QByteArray object
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-21 15:33:27 +03:00
Ivailo Monev
0200224ba3 kded: attach the hostname watcher to the Kded object
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-13 19:11:17 +03:00
Ivailo Monev
dd7bbd86aa kdecore: use kcheckrunning to check if it is full session in KToolInvocation::invokeBrowser()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-01 01:39:49 +03:00
Ivailo Monev
d6d9273029 kded: replace Kded::readDirectory() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-30 14:02:29 +03:00
Ivailo Monev
4213d1a06e kded: update resource list before directory watch
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-30 13:55:42 +03:00
Ivailo Monev
aac8a3f480 kded: README update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-27 04:32:08 +03:00
Ivailo Monev
5968bc3c46 kded: check if timer is active instead of using member as re-creation guard
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 13:21:05 +03:00
Ivailo Monev
84afe0c4a9 generic: run kbuildsycoca4 directly when checking database and start kded4 only to monitor resources
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 12:20:02 +03:00
Ivailo Monev
8cbb665395 kded: remove now redundant KDE_FULL_SESSION X11 atom check
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 09:02:53 +03:00
Ivailo Monev
738b4caea0 kded: disable session manager via SESSION_MANAGER environment variable unset too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 06:36:20 +03:00
Ivailo Monev
7708044f26 kdeui: implement KApplication::quitOnSignal() and use it in kded4
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 02:38:06 +03:00
Ivailo Monev
e83a89249c kded: do not pass --incremental to kbuildsycoca4
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-25 09:57:45 +03:00
Ivailo Monev
fd0befa582 kded: check for KDE_FULL_SESSION X11 atom if KDE_FULL_SESSION is not set
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-24 02:05:44 +03:00
Ivailo Monev
6c007d6851 kded: do not set custom signals handler
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-24 01:03:24 +03:00
Ivailo Monev
fcee5ed25f kded: correct condition for initial sycoca database re-creation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-23 23:58:30 +03:00
Ivailo Monev
d712c60cd1 kded: message filter micro-optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-22 10:54:33 +03:00
Ivailo Monev
abc282545a kded: fallback to kcheckrunning for checking of it is Katana session, disregard session version
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-22 10:30:39 +03:00