Commit graph

78 commits

Author SHA1 Message Date
Ivailo Monev
957f5be670 generic: remove session management support leftovers
the X11 bits anyway. bye, bye broken session management

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:47:21 +03:00
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
ec7b5bd959 kdeui: new KDebugger class
I've had the idea about it in my head for years

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 07:43:17 +03:00
Ivailo Monev
d74d369e5e kdeui: simplify KActionCollection settings reading and writing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 23:10:57 +03:00
Ivailo Monev
91751cc302 kdeui: read actions collections settings once application has started
and since this is done by KApplication it is bound to it, finally shortcuts
are saved and restored tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-25 03:28:47 +03:00
Ivailo Monev
cf229be24d kdeui: drop KCheckAccelerators
already have an idea about something like it but better

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-24 10:59:28 +03:00
Ivailo Monev
c31499dd07 generic: drop messages handler support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 20:17:56 +03:00
Ivailo Monev
0c5d00727e generic: remove redundant Q_OS_UNIX definition checks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-15 09:28:30 +02:00
Ivailo Monev
fbfb374b9c generic: drop scripting and tray support
after changes to multiple sub-projects (Katie, kdelibs, kde-workspace
and kde-extraapps) that finally happened, can write lots about it but I
will keep it short - by rewriting parts that were using js/qml (e.g. the
plasma applets) the desktop startup was reduced to half, also the legacy
tray thing shall be no more (anything that needs tray icon shall be a
plasma applet now) thus some applications and features will be dropped
aswell. see all repositories for the changes done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:06:58 +03:00
Ivailo Monev
1969c7c22a kdeui: drop bogus multihead support
tottaly a hack, restoring applications on specific display will not work
either (not as long as it is possible to start session on any display, i.e.
restoring on specific display is unreliable)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-01 16:19:18 +03:00
Ivailo Monev
9338606754 kdeui: fix possible double-free in KApplicationPrivate::parseCommandLine()
could happen only if "waitforwm" command line argument was passed and there
was no window manager

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 15:11:56 +03:00
Ivailo Monev
8b3009ac6a kdeui: fix KApplication status notifier item actions shortcut conflict
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 15:43:03 +03:00
Ivailo Monev
4b632fcae6 kdeui: implement status notifier for any KApplication instance
optional feature that requires "-tray" command line argument and replaces
what the `ksystraycmd` program was doing. requires "X-KDE-SysTray" entry
in the desktop file as indicator that the application supports "-tray"
argument, unlike `ksystraycmd` does not spawn extra process and even
session management will work properly for it (the argument is manually
added to the restart command)

the feature is very much tide to KMainWindow (and derived classes) but the
overhead is next to none when the "-tray" argument is not specified (the
status notifier is not created in such case) however if created an
expensive tooltip update is done whenever a window changes (may have to
look into optimizing it but then again - most of the code does nothing
unless the "-tray" argument is specified)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 01:41:02 +03:00
Ivailo Monev
3dbd7b1da9 kdeui: do not apply style and palette from KGlobalSettings
palette and style shall be applied by the platform plugin, the font is
independant of the full Katana session (look for
KGlobalSettings::generalFont() for example, font from config is used here
and there because the config and thus KGlobalSettings offer fine grained
font selection for different purposes)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 17:42:31 +03:00
Ivailo Monev
c1015be8c8 kdeui: remove reference to non-existing kDebugCleanup() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:51:53 +03:00
Ivailo Monev
0dd60b4e64 kdeui: deal with TODO related to KGlobalSettings::activate()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 16:02:41 +03:00
Ivailo Monev
32ac1e19f9 kdeui: drop now redundant KApplication hack
see the following commit in the Katie repo:
198625f679aabbe25097884ec0029bc55e0a84b8

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 00:40:20 +03:00
Ivailo Monev
09763a2377 kdeui: create the _NET_SUPPORTED atom on demand
fixes the "waitforwm" command line option
(KApplicationPrivate::parseCommandLine() was called before the X11 atom was
created and atom was invalid) and doubles as optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 00:27:11 +03:00
Ivailo Monev
0f7d9f8ea3 kdecore: setup KCrash to log to the system log, update its documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:51:35 +03:00
Ivailo Monev
7d088288c2 kdeui: remove redundant X11 atoms creation from KApplicationPrivate::init()
XdndDrop is already created by QApplication for internal purposes,
KDE_DESKTOP_WINDOW is a bogus one

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:32:37 +00:00
Ivailo Monev
899f789b07 kdecore: move KToolInvocation to kdeui
to get rid of the KApplication signal which is a hack really

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:09:02 +00:00
Ivailo Monev
0e56bc6115 kdeui: remove unused KApplicationPrivate member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 16:48:12 +03:00
Ivailo Monev
982f2446bb kdeui: remove unused clipboard synchronizer
disabled by default, the KGlobaSettings signal is not emitted by
anything either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 06:44:40 +03:00
Ivailo Monev
e5f56675d2 generic: call QCoreApplication::applicationName() as static method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-19 01:19:01 +03:00
Ivailo Monev
e978590acd generic: define KDE_DEFAULT_DEBUG_AREA in the main build file for each library
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-09 23:43:20 +03:00
Ivailo Monev
6f78051c91 kdecore: implement option to download the icon from KMimeType::favIconForUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-05 08:18:03 +03:00
Ivailo Monev
ee59c22250 kdeui: minor KApplicationPrivate::sessionConfigName() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 18:40:00 +02:00
Ivailo Monev
8ab4b4bd40 kdeui: close only QMainWindow and derived classes from the KApplication quit handler
any widget should be parented to the main window (i.e. be a child of the
main window)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 17:49:33 +02:00
Ivailo Monev
4dd219d38b kdeui: close top-level widgets from the KApplication signal handler
this is much like session management but simply quitting the application
does not close the windows, if windows are not closed they will be leaked
(KMainWindow and derived classes are created on the heap without parent!)
and not saved properly because destructors would not be called

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 17:11:10 +02: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
5e3ceb0dd2 kdeui: quit KApplication when D-Bus daemon disconnects
so that applications (services like kglobalaccel, knotify, etc.) do not
keep running after the daemon quits (e.g. when program is started via
`kdesudo`, daemon quits but does not terminate services). there is a catch
tho - the order in which services quit may cause some trouble for
applications that do not expect services to suddenly stop

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-22 16:16:35 +02:00
Ivailo Monev
9d5d4d3f72 kdeui: remove the compat KApplication::saveYourself() signal
now unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-22 14:36:22 +02:00
Ivailo Monev
275b7be299 kdeui: klauncher recursion hack
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 16:59:18 +02:00
Ivailo Monev
32dbecf2c6 kdeui: disable auto-restart when the application is about to quit
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 10:19:13 +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
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
2e9329f1a1 kdeui: make use of KGlobalSettings::isMultiHead() in KApplication::saveState()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 23:59:22 +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
4a371cc21e Revert "kdeui: remove bogus --kdeinit argument passing from KCrash::defaultCrashHandler()"
This reverts commit a375907865.
2022-11-03 09:54:41 +02:00
Ivailo Monev
95847bfd2c kdeui: initialize static KApplication variables
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 08:01:08 +02:00
Ivailo Monev
b3844e6958 kdeui: deep-copy the event filters list in KApplication::x11EventFilter()
fixes possible KWin crash on exit (does not happen always)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 07:00:18 +02:00
Ivailo Monev
a375907865 kdeui: remove bogus --kdeinit argument passing from KCrash::defaultCrashHandler()
it was ment for kdeinit wrappers but they do not supports such argument

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 08:18:29 +02:00
Ivailo Monev
5336ff3054 kdeui: stdlib is not included for rand() and srand() in kapplication source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-16 23:58:09 +03:00
Ivailo Monev
7543562d33 kdeui: remove for non-existing kde4 wrapper
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-02 00:04:34 +03:00
Ivailo Monev
484f96e12e kdeui: KApplication constructor optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-30 10:18:56 +03:00
Ivailo Monev
e1accc74c8 kdeui: remove unused KApplication::checkRecoverFile() method
nothing saves recovery file(s) in ~/autosave so it is potentially used to
check for file(s) in the tmp resource directory thus of no real value

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-28 01:47:42 +03:00
Ivailo Monev
e88c621aa2 generic: authorization reimplementation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-25 19:27:41 +03:00
Ivailo Monev
29a8459798 generic: remove checks for system headers that should be present
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 15:42:09 +03:00
Ivailo Monev
d05992bda9 kdeui: drop gesture support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-21 04:41:08 +03:00
Ivailo Monev
887bad3ef4 kdeui: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-07 18:13:22 +03:00