Summary:
This reduces a bunch of code, both hidden in the backend as well as the
mostly duplicated front end UI, making it more consistent for users too.
There is a behavioural change that switching user then cancelling will
require your own password.
KSMServer still has the same DBus slot for compatibility which then
proxies over to the screensaver. This could be calling itself, it might
be calling kwin when we're on wayland.
Depends on D15186
Test Plan:
Pressed switch user from the UI
Got a swich user dialog
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: ngraham, mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15187
KDisplayManager::bootOptions only worked with "NewKDM" but KDM is obsolete in Plasma 5.
Creating an instance of KDisplayManager does DBus stuff to find out the DM being used.
Also, kdmrc is dead and this code always returned None anyway.
Differential Revision: https://phabricator.kde.org/D13998
Summary:
Gives a speed boost on multiple monitors where we have multiple views.
Also cleaned up some imports/paths used
Test Plan:
Grepped use of rootContext() referred to the right context
Used greeter to log out successfully
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12891
Since Phonon 4.9, this code fails to play a login sound if the sound
file is specified as absolute file path (without "file://"). The reason
is that QUrl() treats the parameter as Url (not as file path), and this
only accidentally worked with earlier Phonon versions but not any more.
This patch uses QUrl::fromUserInput() instead to create a QUrl from the
string in the settings file, which fixes the problem.
This is the same change as
https://phabricator.kde.org/R289:9db06adc8114163f401417064b07772139bc36bc
in knotifications.
A more detailed explanation of the problem can be found in
https://bugs.kde.org/show_bug.cgi?id=337276#c12 .
BUG: 392725
FIXED-IN: 5.12.5
Differential Revision: https://phabricator.kde.org/D12606
Summary:
The TERM signal handling in ksmserver invokes functions which are not async-signal safe, like Qt functions and C++ destructors. Moreover, the signal handling can occur in other than the main thread, which leads to Qt complaining about functions being invoked from the wrong thread. Such a crash can be seen in a report of [[ bug 384316 |https://bugs.kde.org/show_bug.cgi?id=384316 ]].
To fix both of these issues, this change makes the signal handling use the self-pipe trick, which signals the need for termination to the main thread by writing to a special-purpose file descriptor. The main loop then takes care of the termination. This is mostly inspired by [[ http://doc.qt.io/qt-5/unix-signals.html ]].
Note that `QApplication::quit` already does what we need when destroying the server, particularly deleting `the_server`/calling `cleanUp()`.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, graesslin, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8673
Summary:
This is a preparation step to unset QT_QPA_PLATFORM from the wayland
startup session script. Setting QT_QPA_PLATFORM breaks 3rd-party Qt
software which does not bundle QtWayland. Most prominent example is
the Qt installer itself (see
https://bugreports.qt.io/browse/QTBUG-60222).
On the other hand our Plasma workspace applications need to be forced to
Wayland on a Wayland system. So we have a conflict between we want to
set QT_QPA_PLATFORM and we don't want to set QT_QPA_PLATFORM.
This change adds new API to KWorkspace to address this problem. The new
method adjusts the QT_QPA_PLATFORM based on the XDG_SESSION_TYPE
enviornment variable. It is completely opt-in. Meaning applications need
to explicitly add the call prior to creating the QGuiApplication and if
the user specifies either QT_QPA_PLATFORM env variable or any of the
-platform command line argument variants, the platform detection is
skipped.
The change also adjusts all plasma-workspace applications which should
use Wayland on Wayland to use the new API. The startup script on the
other hand still sets QT_QPA_PLATFORM. We also have applications outside
of plasma-workspace which needs this detection. Examples are:
* powerdevil
* systemsettings
* kinfocenter
Once this change is merged those applications can be adjusted by linking
against PW::KWorkspace and afterwards QT_QPA_PLATFORM can be unset from
startplasmacompositor.
Test Plan: See added autotest
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10816
Summary:
Clicking on a button makes Qt grab the pointer, which means the screen can't be
locked. As we wait for the screen to be locked before switching, this never
happens.
BUG: 391007
Test Plan:
Previously the userswitcher only worked on every second try, now it works
always on the first click.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10802
Summary:
The logout dialog has a taskbar entry and appears like a regular window on
wayland. This is because Qt does not support fullscreen windows with xdg_shell
as of 5.9.4. wl-shell works, so force it for the time being.
Test Plan: Ran ksmserver-logout-greeter on X11 and wayland, looks identical now.
Reviewers: #plasma, graesslin, davidedmundson, bshah
Reviewed By: #plasma, graesslin, bshah
Subscribers: ngraham, bshah, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10425
Summary:
The logout dialog has a taskbar entry and appears like a regular window on
wayland. This is because Qt does not support fullscreen windows with xdg_shell
as of 5.9.4. wl-shell works, so force it for the time being.
Test Plan: Ran ksmserver-logout-greeter on X11 and wayland, looks identical now.
Reviewers: #plasma, graesslin, davidedmundson, bshah
Reviewed By: #plasma, graesslin, bshah
Subscribers: ngraham, bshah, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10425
Summary: port the shutdown dialog to package::fileUrl, dropping the support for old custom themes
Test Plan: shutdown dialog work correctly both with normal and rcc kpackages
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9195
Summary:
It's an overly slow call and it gets in the way on a process that needs
to be responsive
Test Plan: Still boots
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9090
Use the QProcess::start() variant with explicit (empty, in these cases)
arguments, so the program strings are not parsed as shell commands,
thus preserving paths with spaces as such.
Merge commit 6e6f1beda4 appeared
to not include the headers included in the original revert in
the 5.8 branch, causing stable branch build failures on Neon,KDE
and Kubuntu CIs. So add these back to 5.9 branch.
KRun::runApplication will show blocking error dialogs if it fails to
find the executable
This means we don't autostart the next app, which could be fatal if it
comes before...
Summary:
...kwin/plasma
We shouldn't be having blocking calls in ksmserver it can deadlock
And even in the best case we'd still end up blocking ksplash for 30
seconds
We then port to KProcess which was part of the motivation behind the
patch as it
has better stdout handling
This reverts commit 0f19e92f3e.
BUG: 379254
Also added port of autostarting applications to KProcess
It has better stdout handling
Test Plan: Logged in, still got my main session
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5618
Follow-up to the previous commit. KProcess has saner defaults for simply
launching an app and being done with it, no lost stdout/stderr or even SIGPIPE.
CCBUG: 369391
CCBUG: 370528
The "move" (copy in fact) of the autostart code from klauncher simply
switched to QProcess. This resulted in a number of problems, as the incorrect
handling of .desktop file command if it had placeholders (worked around
already), kdeinit is no longer used (not sure how much that matters nowadays)
and finally QProcess simply eats all stdout/stderr of all such processes
(which, when daemonized, can lead even to the processes getting SIGPIPE'd).
If the application to start is a KService, simply launch it as such.
BUG: 369391
BUG: 370528
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
Follow-up to the previous commit. KProcess has saner defaults for simply
launching an app and being done with it, no lost stdout/stderr or even SIGPIPE.
CCBUG: 369391
CCBUG: 370528
The "move" (copy in fact) of the autostart code from klauncher simply
switched to QProcess. This resulted in a number of problems, as the incorrect
handling of .desktop file command if it had placeholders (worked around
already), kdeinit is no longer used (not sure how much that matters nowadays)
and finally QProcess simply eats all stdout/stderr of all such processes
(which, when daemonized, can lead even to the processes getting SIGPIPE'd).
If the application to start is a KService, simply launch it as such.
BUG: 369391
BUG: 370528
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
81fcdb0ceef4a92b64c84e535bd852d9c5df67a2 (in kde-workspace) commented this
out while removing other uses of KNotification, but this one is actually
useful (especially if a app misbehaves) and certainly belong in ksmserver
and not elsewhere.
Follow-up to the previous commit. KProcess has saner defaults for simply
launching an app and being done with it, no lost stdout/stderr or even SIGPIPE.
CCBUG: 369391
CCBUG: 370528
The "move" (copy in fact) of the autostart code from klauncher simply
switched to QProcess. This resulted in a number of problems, as the incorrect
handling of .desktop file command if it had placeholders (worked around
already), kdeinit is no longer used (not sure how much that matters nowadays)
and finally QProcess simply eats all stdout/stderr of all such processes
(which, when daemonized, can lead even to the processes getting SIGPIPE'd).
If the application to start is a KService, simply launch it as such.
BUG: 369391
BUG: 370528
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
Summary:
* use backgroundcontrast effect, improves readability a lot
* non-current actions a bit more translucent
* background is actually black if the color scheme is dark, looks washed out otherwise
* add an OK button, that was complained a lot
* short fade animation at the beginning
Test Plan: see screenshot
Reviewers: #plasma, sebas, broulik
Reviewed By: #plasma, broulik
Subscribers: graesslin, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5036
Otherwise the window isn't fullscreen as far as kwin is concerned and then fast blur code path isn't executed.
Differential Revision: https://phabricator.kde.org/D5115