when a panel is created it doesn't have a view immediately,
so we have to work around by writing its config instead.
we have to force lastScreen of the newly created containment,
or it won't have a screen yet at that point, breaking JS code
that relies on it
NOTE: if we'll allow setting a panel screen from JS,
it will have to use the following lines as well
not creating the panel view yet in order to have the same code path
between the first and subsequent plasma starts.
we want to have the panel appearing only when its layout is completed, to not have
many visible relayouts. otherwise we had even panel resizes at startup that
made al lthe full representations be loaded.
reviewed-by: David Edmundson
at first startup, createWaitingPanels was already
executed when the js setup script terminated.
in this case, don't re-add it to m_waitingPanels
reviewed-by: David Edmundson
We set KeepAbove using KWindowSystem but since Qt 5.7 apparently Qt does something weird and loses the flag.
Explicitly add it to flags. Not doing any other cleanup in the code because this is critical for 5.8.0.
BUG: 368997
FIXED-IN: 5.8.0
Differential Revision: https://phabricator.kde.org/D2825
Summary:
We have a big case because the size depend on whether the panel is vertical or horizontal
but it doesn't really bring much.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2813
Summary:
Whenever we restore, the position of the panel can be random, we need to ensure
that it's placed in the screen boundaries.
I could easily reproduce by having the a vertical set up where the primary
persistent screen is below. Disconnecting the screen above would call restore
but leave the screen in the same position (with very big Y) but with the new
width.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2812
Summary:
The visibility mode needs to be passed to KWayland by mapping to the
PanelBehavior. This is required to pass the correct hint to KWin to
adjust the layering, etc.
BUG: 368499
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2789
Summary:
::restore uses ::config which changes depending on the containment used.
calling positionPanel before restoring, means we're loading
garbage values. This was hidden as location was set just after which
did call restore().
Saves one incorrect resize.
Test Plan:
qDebug + starting plasmashell
Reviewers:
Marco Martin
Subscribers:
the panel size and position is saved per-screen resolution
so at different resolutions (or different screens) the panel always goes
back where it was with the size it had.
this should give a more deterministic behavior to the panel
when resizing the screen (like virualbox) or docking to
an external docking styation
BUG:368741
reviewed-by: David Edmundson <david@davidedmundson.co.uk>
even while closed, the panel controller may control panel size
or offset, with some unwanted binding loops it was
resetting the offset when the panel changes screen (primary
screen changes)
reviewd-by:David Edmundson <david@davidedmundson.co.uk>
Summary:
Empty panel is now shipped as a LayoutTempate rendering this code
redundant.
Test Plan: Still have both default and empty panels listed
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2747
Summary:
the panel tamplates are listed with kpackage listing
but were still loaded with kservicetypetrader
this made possible to have templates listed but not possible
to be loaded. This ports the template loading to the same logic
of the template listing, making thisgs consistent here
Reviewers: davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: davidedmundson, andreaska, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2723
Summary:
some panel plugins don't want to be displayed in the context menu
with the NoDisplay key.
for instance, the systray
Reviewers: #plasma, bshah
Reviewed By: #plasma, bshah
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2727
Summary: This patch adds an OSD to the dbus object so we can hook up layout changes of the XF86Display button. The method isn't really specific to screen osds, but still called like that (it could be given a generic name, since it's basically just a message and an icon to be specified. This current solution is in line with the rest of the code, though.
Test Plan: Test from kscreen's kded, icon and text show up. Didn't test with multiscreen yet (I think this osd should show up on both screens, will do that once off the train).
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2711
Summary:
Sometimes the left/right panel edge shadows don't get drawn.
A resize doesn't always call positionPanel so it never gets updated on all
size changes.
Putting it in the event handlers rather than in the setting, means it
will never be missed again.
Test Plan:
Set panel to fill width
Resizing now shows correct corner
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2668
Summary:
Connecting to QObject::destroyed with Qt::QueuedConnection *should*
crash, when you use the object that's been deleted. it doesn't make any
logical sense.
The only reason it doesn't is because of another hack in Plasma-
framework where containment.cpp where containment emits
QObject::destroyed (yes really) before the actual destruction.
Unfortunately we can't fix the hack in frameworks till we fix this hack
round the original hack here.
This patch ports it to a different signal, which is emitted before
object teardown without hacks.
Test Plan: checked debug appeared when deleting a panel
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2570
Summary:
KWin starting with 5.7 supports struts on panels between screen edges.
Thus we can start setting struts on such panels, it won't exclude a
complete screen. But we don't know how other window managers handle it
and it's in general a rather "dangerous" change.
Thus to not affect other window managers, we check whether KWin is
running and only allow struts on thus panels if KWin is running.
Unfortunately we need to test this every time we go into the code path
as the WM might have changed.
In case the user replaces the window manager at runtime this still can
result in a bad situation.
BUG: 94470
FIXED-IN: 5.8.0
Test Plan:
Tested whether it works in general in X11. Further testing
needed by X11, multi-screen users.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2164
Summary:
We are providing the parent if it is a QWidget, but still,
there is no need to have this window remain in memory
after closing.
If the parent is not a QWidget, this is a memory leak.
Reviewers: mart, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2549
Summary:
The previous approach of having an array of object that
hold information about the current config group and the config keys
and values was not really scalable nor intuitive.
Now, the config is an object that has the group names as keys,
and each group has its own configuration (key, value) pairs.
The config groups are identified as a unix-like path
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2516
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
ContainmentView tried to ensure the panel is only shown when it is ready but
the code didn't take into account the fact that UI ready is emitted asynchronously
so the panel would have never shown up leading to this client-side "workaround".
This requires 1d66098 of plasma-framework!
Differential Revision: https://phabricator.kde.org/D2475
Summary:
It makes no sense to modify the focus of containment within it's
FocusScope, and activeFocus will be set correctly by code in
QQuickWindow. Especially as it doesn't set it back.
The only way this would make any sense is if someone in Desktop is
incorrectly using "focus" when they mean to use "activeFocus". This code
was introduced to fix a bug in the toolbox (331971) where someone was
making the mistake above.
That toolbox code has been subsequently fixed properly, leaving this as
dead code.
Test Plan:
Toolbox still closes appropriately.
Everything else still seems the same
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2446
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
if the machine has a primary screen, inserting to
0 will give an assert. take that into account
and insert starting from 1 if a primary screen is found
this should fix the autotest on ci
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>