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:
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
Summary:
There is a small time-window when Plasma's internal data
regarding activities is not synchronized with the internal
data of the KActivities library.
This leads to Plasma reporting a different list of activities
than the list of activities it has containments for.
This patch changes the activity list that the ScriptEngine reports
to be the one that Plasma knows about.
See: https://bugs.kde.org/show_bug.cgi?id=365606
Reviewers: #plasma, davidedmundson, sebas, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2187
Summary:
After the previous patch which removed the unused
Activity class related events, it started becoming clear that
said class is only really used to store the name of the
containment plugin that should be loaded for an activity.
Instead of keeping a map of these objects (QObjects) with
all their baggage, the shells now only keep the map of
activity IDs and corresponding plugin names.
Reviewers: mart, bshah, davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2176
Summary:
A few private slots handling the events of Activity objects
have been lingering in ShellCorona never to be called.
I've grepped both plasma-desktop and plasma-workspace for these
(even though they are private slots) and they seem not to be
used anywhere.
Reviewers: #plasma, sebas, davidedmundson, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2174
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: jriddell, plasma-devel, #neon
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2117
Summary:
qDeleteAll will iterate through containments() however this is
dynamically changing the list we're iterating through.
Particularly bad is deleting the panel might delete the system tray
containment, leading to a double delete on a now dangly pointer.
Test Plan: kquitapp5 plasmashell. No crash
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1890
don't hardcode -a as the internal systray screen anymore.
give it the new customembeddedcontainment containment type,
and ignore those in panel creation.
the old systray logic in containmentforscreen gets reused.
loadScriptInInteractiveConsole requires user interaction which blocks
some purposes, like setting the desktop background from an app.
This runs a given script directly from a passed string without any
prompts.
CCBUG: 217950
REVIEW: 125648
Makes it possible to test how/if a plasmoid behaves correctly on the most
similar environment possible to what the user would find on a production
system.
* Loads a plasmoid on a panel and the desktop.
* Lets it test his own stuff (loading test/test.qml within the plasma
package)
* Terminates with an error if it wasn't successful
REVIEW: 127346
Remove unused variables
Make sure accessing elements within an assert doesn't change the state of
the class.
Don't keep checking if a variable is not null.
Summary: This way the close-on-focus-lost does not happen
Reviewers: mart, broulik
Reviewed By: broulik
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1093
Make use of Qt5.5 API QQuickWindow::sceneGraphError rather than catching
the errors in a message filter.
I also merged with existing warning where contexts could be created, but
compiling shaders would not work.
BUG: 358869
REVIEW: 127254
Views shouldn't decide to delete themselves.
ShellCorona is responsible for managing them, it should be the one
managing them in all cases.
bring panelContainmentDestroyed and desktopContainmentDestroyed in line
REVIEW: 127225
We were mixing KScreen and QScreen API.
Corona.cpp checks we are requesting a containment for a valid screen
if (screen >= 0 && screen < numScreens()) {
This fails as numScreens() is Qt API based, whereas the signal we're
adding the output for is ShellCorona::addOutput
BUG: 351777
REVIEW: 126961
Emitting objects in another object is weird.
ShellCorona::availableScreenRect knows what properties of panelview we
use, so tracking of property changes should be in ShellCorona.
Also simplify ShellCoronaCode, if the rect changes the region has also
implicitly changed. We can handle that in one connect.
REVIEW: 126576
engine()->rootContext() will give a different result to
rootContext() when using a shared engine.
One being in the right context, the other being the context of the
shared engine. Using the latter means two panels end up sharing the same
object which leads to some interesting results and QML crashes in
QV4::QObjectWrapper::wrap when one gets deleted.
I've tested against 356545, but I think it's the cause of a lot of the
mystery QML bugs we couldn't figure out.
BUG: 356545
BUG: 355885
BUG: 356916
REVIEW: 126491
To move the panels of screen [i] to the next screen, we should query for
the panels of DesktopView [i], not of DesktopView [i + 1]. Otherwise the
panels aren't shifted to the new screen. Thus QT shifted the
panels itself, but hid them afterwards. Besides the panels were not
visible, it raised an assert in screenInvariants().
REVIEW: 125694
When a new primary output gets connected, it's possible that
primaryOutputChanged() is called before addOutput(). When addOutput()
was called afterwards, this led to two DesktopViews on the same
screen. This raised an assert in screenInvariants().
Solve this by not doing anything in primaryOutputChanged() when the new
primary output is not used for a DesktopView yet.
REVIEW: 125693
We have a
connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged,
[dashboardAction](bool showing) {
dashboardAction->setText(showing ? i18n("Hide Dashboard") :
i18n("Show Dashboard"));
in the class constructor. Changing it here too is pointless.
REVIEW: 125669
execute a script from the look and feel package when
an applet is added, adding to the script environment
"applet" that wraps the currently added applet and
"containment" that wraps its containment.
from there the javascript part can do anything it can do
in the startup script as well.
In case of containments, "applet" and "containment" will
be the same thing
REVIEW:125562
since we can't subclass Dialog (created from QML) inject a class
that will control it with event filters from the shell
(in an eventfilter as well installed on the qapp)
REVIEW:124555
This fixes a crash on shutdown when it has already deleted its
views but someone calls into availableScreenRect
BUG: 348511
FIXED-IN: 5.4.0
REVIEW: 124323
This change introduces the first part of Wayland integration. If
running on platform Wayland we try to bind the org_kde_plasma_shell
interface through the help of KWayland client library. If this interface
is available we can use it to create a PlasmaShellSurface for the
PanelView's window and mark that as a panel.
A compositor with support for the org_kde_plasma_shell interface can
use this information to make the window operate as a panel.
REVIEW: 124054
reconsiderOutputs() may be called before the async config fetching
operation (KScreen::GetConfigOperation) has finished, so the pointer is
still null at that point. This can happen if qApp::screenRemoved fires
before kscreen was able to start the backend loader and pass back a
ConfigPtr.
The bug is rooted by in the dual-use of libkscreen and qApp's QScreen
handling. The timings here produce this race condition. This patch
should be quite safe, though, since it doesn't change the logic, but
rather makes sure this race condition bails out nicely by falling back
to just waiting until a kscreen config has arrived (which will happen
right after).
BUG:346590
REVIEW:123648
FIXED-IN:5.3.1
CHANGELOG:Fix crash on Plasma startup caused by a race condition