Commit graph

3597 commits

Author SHA1 Message Date
Ivailo Monev
6c98720e24 kdeui: implement KCrash::NoRestart flag
for programs that cannot be restarted by simply exec-ing them such as the
KIO slaves which require application socket as argument

note that restarting is maybe works thing - programs started by kdesudo
cannot be restarted (properly) as they are exec-ed by other program that
does the setup for them to function the way they should

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 00:36:35 +02:00
Ivailo Monev
936cc87544 kinit: log messages when service status changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 23:45:49 +02:00
Ivailo Monev
e7375fce97 kinit: set the application ID of the ASN
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 22:41:52 +02:00
Ivailo Monev
d4bf3d7a70 kdeui: exit after logging error when drkonqi is not installed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:54:32 +02:00
Ivailo Monev
41418cb12b kdeui: set the KCrash handler to the default one if command line args are not initialized
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:33:04 +02:00
Ivailo Monev
f1e45b0142 kdecore: PCI IDs database update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:12:43 +02:00
Ivailo Monev
6896f96245 kdeui: check if the KCmdLineArgs pointer is non-null before using it
fixes possible crash (e.g. when KCmdLineArgs is not initialized)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:49:43 +02:00
Ivailo Monev
d258df3881 generic: unblock signals when setting handlers for them
generally, those signals should not be blocked but it seems something is
blocking consequent SIGSEGV signals send by `kill` for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:45:25 +02:00
Ivailo Monev
053898e849 kio: use the default KCrash handler for debugging KIO slaves
once KIO slaves are plugins it would not matter tho (KApplication sets the
KCrash::DrKonqi flag already) but for now since they are detached
process poping drkonqi in case they crash (and KDE_DEBUG is set) is more
usefull than printing trace to stderr

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:33:20 +02:00
Ivailo Monev
be2d99738e kdeui: use system() instead of QProcess to execute drkonqi
less things can go wrong

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:14:26 +02:00
Ivailo Monev
08a5c77e48 kio: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 23:50:37 +02:00
Ivailo Monev
a0254bdc68 kutils: set KMediaWidget position independant of the value
now it works as expected when the arrow keys are pressed or when its
position is changed by clicking while having the mouse cursor on either
side of the current position

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 11:35:07 +02:00
Ivailo Monev
aef479ab03 plasma: do not guess the mask color in FrameSvg::mask()
using the mask created by QPixmap::mask() is much more reliable way
to get one, fixes masking in case compositor is not active for example

side note: feels good to finally land the fix for masking

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 09:26:21 +02:00
Ivailo Monev
a3d14ed9f8 plasma: query KWindowSystem directly for the compositor state
because Plasma::Theme (and Plasma::ThemePrivate indirectly) may be created
before QCoreApplication/QApplication instance by Theme::defaultTheme()
and application instance is required for QX11Info::display() to return
non-null (which KWindowSystem uses but has fallback in case it is null
in KWindowSystem::compositingActive())

note that KWindowSystem::compositingActive() returns cached value if
XFixes is available

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 10:27:10 +02:00
Ivailo Monev
40633cc361 kdecore: add debug area for kgreeter
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 09:43:25 +02:00
Ivailo Monev
c1a17d5a30 kio: disconnect the slave and close the connection in case of error in the slave loop
this was done only when there was pool socket (when klauncher was handling
slaves) but it has to be done anyway to prevent more tasks (commands) from
being send after error occurs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 05:22:53 +02:00
Ivailo Monev
bc067dbdfa kio: drop support for putting slaves on hold
with klauncher no longer responsible for KIO slave the next step is to
make them plugins and the feature to put them on hold will be of no value
because QLibrary reuses library/plugin instances and creating a new
slave object will be cheap

in other words the performance will be similar to that of KFileMetaInfo
for which I also wrote the plugins myself - they are pretty quick
compared to what strigi was doing and with more flexible configuration
interface but it took some effort to get there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 04:22:23 +02:00
Ivailo Monev
d7d7888d28 kinit: warning message correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:31:18 +02:00
Ivailo Monev
d5027edeb5 kinit: comment clarification
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:21:46 +02:00
Ivailo Monev
b3d1569867 kdeui: tag comment as note in KCrash::defaultCrashHandler()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:16:46 +02:00
Ivailo Monev
6d0209a2e0 kinit: log message when ASN is disabled for service
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:07:33 +02:00
Ivailo Monev
8e0c48a7f7 kinit: log the ASN binary
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:47:51 +02:00
Ivailo Monev
e4458950a5 kinit: include required directories
fixes bootstrap build, I have to setup buildbot for this..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:19:36 +02:00
Ivailo Monev
df1263c847 kutils: UIC warning fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:13:40 +02:00
Ivailo Monev
54690e0d55 kinit: tweak the processes termination
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 19:54:32 +02:00
Ivailo Monev
a320630b94 kinit: check if ASN is disabled for service via KRun::checkStartupNotify()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:50:21 +02:00
Ivailo Monev
e1db604f6b kinit: inline static functions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:49:23 +02:00
Ivailo Monev
babadc729f kio: remove unused KRun::checkStartupNotify() argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:47:55 +02:00
Ivailo Monev
e0b6830e53 kinit: fill more ASN info for services
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:33:24 +02:00
Ivailo Monev
5bc229297b kinit: do not call KStartupInfo::sendStartup() with invalid ASN info
KStartupInfo::sendStartup() does this anyway but the debug message will not
be logged

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:08:26 +02:00
Ivailo Monev
eeb31af052 kinit: remove redundant sendSIFinish() call
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 06:31:14 +02:00
Ivailo Monev
dbb3316ce1 kinit: add exception to unique application/service starting logic
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 06:29:40 +02:00
Ivailo Monev
ce33f0e615 kinit: do not attempt to start service if it is started and its X-DBUS-StartupType is set to unique
for Katana that does not do much tho, applications that have
X-DBUS-StartupType set to Unique use KUniqueApplication which does the
neccessary checks to make sure another instance is not started

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 06:12:51 +02:00
Ivailo Monev
705386b4e9 kinit: check if the process is running while waiting for its service
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 05:32:37 +02:00
Ivailo Monev
b447c353a7 kdeui: log error in case neither of the KCrash flags is set
since any message type can be set to log via syslog() that may be the only
way to know when a program without interface (such as service) crashes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 04:23:05 +02:00
Ivailo Monev
96de7d5684 kinit: send ASN start before starting the program
now that ASN update is send from signal it was possible update to be send
before start

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 04:07:43 +02:00
Ivailo Monev
7b2a33efec kinit: include system signal header for kill()
fixes build on FreeBSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 02:50:12 +02:00
Ivailo Monev
7205f8f391 kdeui: install the KWindowSystemPrivate event filter before selection XFixes input
fixes possible X11 event race

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 02:48:44 +02:00
Ivailo Monev
148110f398 generic: drop locolor support
`apt-file` search yeilds 221 files matching (8 packages provide such),
it is also unused by plasma even tho there are leftovers from support for it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 01:30:27 +02:00
Ivailo Monev
0e16676993 kinit: set the ASN binary to the program filename
altough the complete program path is more informative, setting it to the
filename only matches the old behaviour

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 01:19:28 +02:00
Ivailo Monev
ca2af71922 kinit: check if absolute paths exists from KLauncherAdaptor::findExe()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 01:01:08 +02:00
Ivailo Monev
ef0dd41a12 kdeui: do not assume XDisplayString() and getenv() return non-null
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 00:45:26 +02:00
Ivailo Monev
ac048407c3 kinit: cache the QDBusConnectionInterface
it will not change because the connection is persistent

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 00:39:08 +02:00
Ivailo Monev
5177126cc6 generic: documentation update
note that the kdeinit README used to reference Pentium 3 CPU

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 02:08:10 +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
e851a35ee5 generic: remove unused X-KDE-autostart-after feature
klipper and kmix set it to "panel" in their .desktop files but that's not
valid application/service

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 04:06:04 +02:00
Ivailo Monev
a684811e80 plasma: remove duplicate header inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 03:54:58 +02:00
Ivailo Monev
409253ab09 kdeui: enable complex animation effects by default if compositing manager is running
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 03:22:28 +02:00
Ivailo Monev
0f0c306927 plasma: move bufferPixmap variable to the scope it is used in
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 00:57:54 +02:00
Ivailo Monev
7f3fa16363 kio: remove documentation for removed KIO::StatJob method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 00:18:50 +02:00