This adds an option to set the accent color from the current wallpaper.
The way it works is that it exposes some DBus calls; if a wallpaper plugin
supports wallpaper accent colors then it should say so by this DBus call
when starting up and also should say which wallpaper is being currently
used (for the purpose of extracting an accent color from it) or set an
accent color itself. After that it should keep declaring the wallpaper or
set accent color whenever wallpaper changes or whenever the plugin author
thinks it is appropriate to say so.
There is already an implementation of the color extracting algorithm which
the plugin can either use, or else set whatever accent color it wants. The
necessary DBus calls for the official image and wallpaper plugin are
implemented, so they should work out of the box.
BUG: 444676
FIXED-IN: 5.25
index desktop views by qscreen instead of id, making ScreenPool
the single source of truth for the mapping between screen names
and ids. This is less error prone and easier to consistency check
(if view->screenToFollow() is ever different to its has key it will
assert)
The whole logic of screen management is moved to ScreenPool.
ShellCorona will have to never call QGuiApp->screens, but only trust what ScreenPool it's telling it
Also adds an autotests on screenpool which makes a fake wayland server which sends screen added/removed/changed events
An UI to manage Screen assignment of Containments, the main use case is to recover lost or inactive panels from a display that you can no longer access.
qml part: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/618
related to https://phabricator.kde.org/T14346
CCBUG: 447044
Access the dialog from Toolbar in Edit Mode (Manage containments)


To show the dialog, simply enter in `edit mode`, then you can :
* See known displays and their panels and desktops, the dialog automatically update when adding/moving/removing a panel.
* Delete a panel or a desktop
* Recover a panel by moving it to an active display (click on move icon, then select the proper action in drop menu)
* Recover a desktop by moving it to an active display, in fact, this will swap it with th targeted desktop
* Modifications are automatically applied
What I've tested:
* Adding a panel, adding some applet on it. Then disabling its display, open the dialog and move it to an active display, restarting session, the panel is here with its applet.
* On another display, add applets (sticky note) on the desktop. Disable this display, open the dialog and move it to an active display, restart session, both desktop were swapped and you see the background (if different) and sticky note available.
when we disconnect all real outputs, we only have a single fake QScreen in this case consider corona to not have screens and remove all desktops and panels. makes easier for a coherent reconstruction when real screens get back and won't save in screen mapping the :0.0 connector name
Refactors XRandr support together with the new Wayland code into a
PrimaryOutputWatcher class.
For X11 it listens to xcb events.
For Wayland it uses the kde_output_management_v2 protocols.
Plasma had an entire text editor for the script engine in process.
The method for loading this was very convoluted, it loaded a QML file
(in plasma-desktop!) which contained an Item(!) which then loaded a QML
component that showed a widget dialog.
It also means loading a very heavy lib KTextEditor in ShellComponents
which is very heavy. This will get loaded in things like the logout
greeter, which is super slow on the pinephone.
We already had the concept of evalating a script remotely, we can just
hook up the print statement and move the whole executable out.
Technically this is an API break on the plasmashell DBus API, but
pragmatically going from void -> something on the return type isn't
going to break anything.
ShellCorona is created before KDBusService which registers the name.
This causes a problem as we register global shortcuts before plasmashell
--replace has kiled the old application, which in turn deregisters
everything.
We want everything before KDBusService to be as light as possible.
Moving ShellCorona construction is not trivial as some argument parsing
uses that.
BUG: 408310
ShellCorona is a messy class doing mulitple functions.
This patch splits out all telemetry code into a new class, meaning it's
easier to extend. Code remains the same.
Summary:
Before loading the view, query all plasma processes and show why they're using
KUserFeedback.
Depends on D26569
Test Plan: Manual testing
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: ngraham, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26570
Summary:
I'm trying to implement the idea of @davidedmundson from this https://phabricator.kde.org/T10172 with my limited knowledge of C++/Qt/KDE/programming. This is the start of a new class so it could lack many things but it's usable.
- It allows clients to set the available screen rect/region from outside through dbus.
- The final available screen rect/region would be the intersection of all set values.
- When a client dies, its values would be removed automatically.
Test Plan:
+ qdbus-qt5 org.kde.plasmashell /StrutManager test org.kde.lattedock LVDS-1 0 24 1366 768
+ After killing latte-dock, the values are got only from plasmashellCorona.
{F7820969}
Reviewers: #plasma, mvourlakos, davidedmundson, mart, apol
Reviewed By: #plasma, davidedmundson
Subscribers: davidre, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25807
Summary:
It offers 2 main features:
- Configure the system-wide KUserFeedback kill-switch
- Provide a setting for how much information we want our Plasma to be sending
Test Plan:
Tested it together with Discover, works fine.
{F7497259}
Reviewers: #plasma, vkrause, ngraham
Reviewed By: ngraham
Subscribers: aspotashev, ngraham, bcooksley, davidedmundson, ognarb, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24011
Summary:
We had an overly complex and in practice unexploited system to detect
which shell to use,
This patch changes it to default to the desktop, still allowing to
modify which to use from --shell-plugin argument.
Test Plan:
Starts up fine, --shell-plugin/-p still works, which is what
bhushan told me is important for plasma mobile.
Reviewers: #plasma, davidedmundson, bshah
Reviewed By: #plasma, davidedmundson, bshah
Subscribers: bshah, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22874
Summary:
If the desktops are already visible, there's no much need to hold on the KSplash. Panels should be ellegantly displayed when they're ready.
As discussed in T10958.
Test Plan:
Made sure that it gets emitted at the right time.
Timing-wise, my system takes about 1s to show the DesktopView and 2s to show the PanelView (I have 1 panel)
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21494
Summary:
If we cannot create a GL context, instead of showing an error and
quitting, switch to using the QtQuick software renderer and restart.
If software mode is already set, then show the error as before. This
could happen in the case of the software renderer not being installed.
Test Plan:
After doing some driver changing, I ended up with the annoying "plasma can't start"
message.
Without the entry in kdeglobals I now start plasma and it seamlessly comes up
working.
Reviewers: #plasma
Subscribers: mart, broulik, graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11722
Summary:
with new corona containment query functions in D11361 the data
copy done in m_desktopContainments is no more necessary: this should
make things a bit more simple and robust
Test Plan: launched plasmashell, tried to add/remove activities and screens, all keeps working
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11801
Summary: This is the implementation of the new Plasma Corona API, as described in https://phabricator.kde.org/D8566
Reviewers: #plasma, ervin, dvratil, mlaurent, hein, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: mwolff, apol, mart, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8567
Summary: Replace QObject::sender() and tracking objects in a list with a simple lambda.
Test Plan: Opened and closed dialog.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6615
if applets react to it it can cause a crash, because the corona
may not be valid anymore, and we don't want to relayout
things anyways when tearing down
reviewed-by: kbroulik
Summary:
this replaces the approach with the expose event in
20b439a4f4 by directly monitoring the xcb screen change
notify native event
Test Plan:
attaching and detaching the external screen on a laptop
configured to deactivate the internal screen upon connection
same behavior as D3777
Reviewers: sebas, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: pmuralidharan, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3822
Summary:
this replaces the approach with the expose event in
20b439a4f4 by directly monitoring the xcb screen change
notify native event
Test Plan:
attaching and detaching the external screen on a laptop
configured to deactivate the internal screen upon connection
same behavior as D3777
Reviewers: sebas, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: pmuralidharan, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3822
Summary:
--shows/hides the WidgetExplorer through dbus
Test Plani: trigger widget explorer from command line
Reviewers: mart, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3754
It registers global shortcuts Meta+1 through 9 and 0 and will ask the first task manager
it finds* to activate the task at the given index.
*) It searches all panels on the primary screen for an applet that provides "multitasking"
(ie. task manager, icon task, window list) and invokes said method. If there is none, it
will then search all panels. This will fit the 90% usecase and avoids an overly complex
configuration workflow.
Differential Revision: https://phabricator.kde.org/D3581
Summary:
now that KWayland is a framework, it's used directly from
Dialog, no need to inject kwayland usage from here anymore
Test Plan: Dialogs still have shadows and still move under wayland
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3024
After feedback from the VDG, use a single config fuile again,
this changes the behavior in the following way:
* layout switch after switching lnf from the kcm is optional
* the swiitch is permanent, the old layout is lost after switch
Summary:
- Serializing the desktop layout for current activity
- Support for different config groups
- Introducing the mechanism for the future API versioning
- Loading the desktop from the serialized data
- Added debugging output just for comparison with regular layout.js
- Splitting V1 scripting functions into a separate class and file
- Loading the panels
- Disabled the debugging output
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2480
Summary:
ShellCorona provides a new DBus method "activateLauncherMenu". If that
is invoked it will look through all panels for an applet which has
X-Plasma-Provides with org.kde.plasma.launchermenu. If that also has
a global shortuct it gets activated and no further applet is searched.
The idea behind this DBus call is to provide a way to KWin to activate
the main appliction launcher when the Meta key is pressed.
Reviewers: #plasma, hein, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2356
don't index m_desktopContainments by screen id
that will change and will break.
also, in createcontainmentForActivity, don't return one
that is already taking another desktop view
BUG:366394
BUG:366395
reviewed-by: Sebastian Kügler <sebas@kde.org>
Summary:
check first i the lnf package if
we have a default containment for the current shell
then fallback to the one specified by the shell package
Reviewers: ivan, #plasma
Reviewed By: ivan, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2286
Summary:
We used to append them, but that didn't work well and was crashing plasmashell
on fresh start.
A default desktop would be created alongside with the one provided by the
layout instead of replacing it.
If a layout wants to provide an additional screen for a desktop in the secondary
screen, it should specify the screen.
Test Plan:
Now the plasmashell tests pass. In fact I noticed it was broken due to an e-mail
Jonathan sent me that the test on neon was timing out. The test in neon will
freeze when the test crashes. Probably something to look into.
It can be reproduced by running:
```
xvfb-run -a --server-args="-screen 0 1024x768x24" dbus-launch --exit-with-session <exec>
```
Where `exec` is the process we need to run.
Now the test passes.
It's a crash that I had reproduced locally in the past. I can't now.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: sitter, jriddell, plasma-devel, #neon
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2117
Summary:
Containment creation relies on the current activity, so
we need to change the current activity when creating one
from PlasmaScript in order for the Containment to be created
correctly.
Test Plan:
Tested with:
print(currentActivity());
var id = currentActivity();
var desktops = desktopsForActivity(id);
print(desktops.length);
for (var i = 0; i < desktops.length; ++i) {
print(desktops[i].id);
}
var id = createActivity("Day 4 - Test 1 - " + activities().length);
var desktops = desktopsForActivity(id);
for (var i = 0; i < desktops.length; ++i) {
print(desktops[i].id);
}
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2211