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 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
Instead of keeping the state, expect the code to follow the order it's
expected from it.
Bumps kf5 requirement to 5.4 (i.e. master as of today).
REVIEW: 121244
The hack we used to have is not working anymore because they changed how
Qt works (And it was a hack after all).
On the other hand, on Qt 5.4 we can use the API I added for this purpose,
so listen to screen removed before the window is shuffled somewhere else
so we can cleanly remove the view.
Reviewed by DJ Edmundson
the screen related static methods are just as well served by being
class members: they aren't used elsewhere, were being passed the same
internal datamembers repeatedly, etc.
also move them below the constructor to where they generally make
more contextual sense.
this places the responsibility on the shell package and removes
the assumption that the alternatives UI is a dialog that is placed
alongside the applet. that, my friends, is a desktop form factor
assumption.
The primaryOutput method in KScreen is not consistent with Output::isPrimary
and made plasma shell become a bit inconsistent too.
Loop through the outputs for now, until we've got a better solution.
BUG: 338109
CCBUG: 335710
I set up some of the methods as invokable, so that we can export most useful
stuff. I won't add it by default though, because it could be bad.
What it needs is:
- dbus.registerObject(QStringLiteral("/PlasmaShell"), this);
+ dbus.registerObject(QStringLiteral("/PlasmaShell"), this, QDBusConnection::ExportAllContents);
Rename removeDesktop -> removeScreen
Embrace removeScreen as the procedure to disable a screen.
Don't delay destruction of the panels either, the screen could have been
deleted by then.
::shiftViews seemed like a good idea, but it clearly was not. I promise I
was not on drugs when I decided to use it.
Instead, take a recursive alternative, like we did with insertScreen that
will take care about panels and views.
We already used to follow it, but we didn't control most use cases.
Now we'll track the position and geometry changes to make sure that when
they change, redundant outputs can stop being redundant.
Workaround a lack of API from Qt where it will decide to move the panels
around without us being able to control it.
This patch overrides the QWindow::screenDestroyed slot to be able to decide
where to move the Panel or whether it needs to be removed. This is
considered a workaround and should be removed once the new API is in and
released.
See also: https://codereview.qt-project.org/#/c/88351/
BUG: 335710
If there are no Shaders Plasma doesn't work. If we detect this we show
a warning (without GL) and exit.
This doesn't really work as Qt has a bug which doesn't allow to detect
whether Shaders are supported and the exit just doesn't work.
REVIEW: 118812
Qt::UniqueConnection doesn't work well with lambdas, as it's actually a new
connection every time.
Turn it into a method so that Qt can make sure we're connecting only once.
destroy the script engine after use.
is usually used a single time anyways, so saves memory and executes
the code parts that in the bindings gets executed at destroy
such as wallpaper change
BUG:334667
So far we were just enforcing that 0 would be the primary screen. After
this change we will make sure that the rest are layed out horizontally and
then vertically if there's a 2 at the same position.
If a new screen is connected, we'll try to put it in the correct position
following the described situation.
BUG: 334502
Set a scope to lambda calls by passing the qobject, otherwise connects
persist after the object has been deleted.
Destroy the panel views when the ShellCorona is destroyed, otherwise they
stay available when the QScreen instances are cleaned up, provoking weird
crashes.
Qt subsystem has deficiencies on their approximation to multiple
screens. [1]
This patch adopts libkscreen to figure out screen additions and primary
modifications.
I'm not merging to master yet as I'm experiencing some issues but it's
already far more comfortable to work with than QGuiApplication::screens().
[1] https://bugreports.qt-project.org/browse/QTBUG-38404
CCMAIL: plasma-devel@kde.org
if the screen isn't there when plasma starts,
don't add the panels of that screen
if a screen is disconnected, remove the panels of said screen
BUG:333193