This also makes use of ksmserver a lot more optional. Requests to logout
go directly to org.plasma.Shutdown.
Effort has been put into keeping the QML context property usage API
compatiable even though the current code is really a mess.
Summary:
Removing this is part of preparations for ksmserver to become just an X
session manager. See T9779.
Instead of ksmserver opening the greeter with a tonne of args and then
having a socket to watch for changes, the new mechanism is that we fire
and forget the prompt. Then the logout prompt calls back into ksmserver
with the request. Simplifies code greatly allows for moving.
KSMserver's shutdown DBus method remain on ksmserver for compatibility,
but ultimately spawning the prompt will move to libkworkspace and called
from the session directly.
QML API in the logout greeter remains mostly untouched.
Behavioural changes are minor:
There was a QML property "choose" exposed to the greeter if the default
shutdown option is set to None. Though we don't allow this in the KCM
and our default prompt doesn't use it.
We no longer block a user from saving a session whilst a logout prompt
is active.
Test Plan:
Logged out
Shutdown
Also ran with old ksmserver, still got a prompt
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16066
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
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:
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
It's a separate application and does QtQuick stuff, so it should also honor when we e.g. enforce software rendering.
Differential Revision: https://phabricator.kde.org/D2962
Summary:
Positions the shutdown dialog in the absolute space if there is the
PlasmaShell interface.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2445
Summary:
This follows the approach of kscreenlocker and ksplash: in multi-screen
setups there is one dedicated greeter shown per screen. When the screen
changes resolution, the view gets adopted, when a screen is destroyed,
the view is removed and when a new screen gets added, a view gets
created.
This should make the logout dialog work reliable in multi-screen setups.
As an additional change it's no longer bound to X11 and can also create
views on Wayland, though further integration is required to have the
views positioned correctly and make the compositor aware of this being
a logout dialog (handle like popups).
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2264
Summary:
The idea behind this change is to have a dedicated binary for the
logout dialog. As a follow up ksmserver needs to be adjusted to invoke
the helper binary instead of interacting with KSMShutdownDlg directly.
This will bring quite some improvements to the logout architecture:
* ksmserver doesn't need to run a QEventLoop to wait for the dialog to finish
* it becomes easier to test changes for the logout dialog, one doesn't need
to restart the session any more
* ksmserver becomes better guarded against problems in the UI layer (e.g.
OpenGL errors)
* the binary can be changed to support Wayland
* ksmserver becomes better guarded against problems with updating Qt
while the session is running
This change only introduces the creation of the binary. A new sub-dir
"logout-greeter" is added which creates a ksmserver-logout-greeter.
The greeter defines various command line arguments for the options which
are being passed to the KSMShutdownDlg.
If the dialog returns an exit value of 0 it is interpreted as accepted.
A return value != 0 indicates that the user rejected the logout.
The dialog also passes additional values back. In particular the logout
method might be changed and returned back to ksmserver. To support this
operation a pipe filedescriptor can be passed to the greeter. If present
the greeter will write the numerical value of KWorkspace::ShutdownType
into the pipe on success.
To indicate how the interaction - especially the reading from pipe -
works, the change comes with an additional test binary. It forwards
the command line arguments and creates the pipe to pass to the greeter
and reads it back in a helper thread to be non-blocking. This approach is
inspired from kwin_wayland's starting of Xwayland.
Test Plan: See the new test binary
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2252