Summary:
Instead of making PanelViewConfig manipulate the visibiltyMode of
PanelView, make PanelView force the view to be visible whilst the
config
is open.
This is cleaner as it doesn't alter the original config, and
resolves a
bug that opening configure with an autohide panel would shift
contents
about.
Test Plan:
With panel as autohide opened config
Moused away from panel, panel stayed visible
With panel as autohide, plugged in a USB pen - panel appeared - and
closed when I hid the dialog
Changed mode in panel config, panel didn't immediately change - but did
on close.
Tested with all modes.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
BUG: 372248
Differential Revision: https://phabricator.kde.org/D3408
Summary:
This patch adds a variable called "backgroundHints"
which can be used with (NoBackground) through qml
in order to enable/disable the KWin effects for
a specific panel and the panel shadows in case the
effects are disabled.
Currently these effects are (Blur and Background Contrast)
Reviewers: #plasma, #davidedmundson
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3282
FEATURE: 368384
Summary:
Otherwise we have a gap during load (waiting querying kactivities))
between screen pool being created and us connecting to the screen
changed signals, which in turn are used to update screen pool.
In particular the primary screen can get out of sync between the current
state and the screen pool.
Test Plan: Based on Christopher Feck's research and initial patch
Reviewers: #plasma
Subscribers: mart, rwooninck, fvogt, cfeck, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3319
CCBUG:372099
CCBUG:371858
CBUG:371991
CCBUG:371819
CCBUG:371734
Summary:
load() can be called multiple times; either from setShell or
loadLookAndFeelDefaultLayout. We still only want addOutput once when a
screen is added
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3320
CCBUG:372099
CCBUG:371858
CBUG:371991
CCBUG:371819
CCBUG:371734
at startup, if a screen id is missing from the screenpool mapping
containment::screen() will return -1 for a moment in the startup
phase even if it has a valid lastScreen
populate mappings of eventual missing stuff at screenpool ctor
make sure destroyed containments don't get assigned a view
reviewed-by: David Edmundson
CCBUG:372099
CCBUG:371858
CCBUG:371991
CCBUG:371819
CCBUG:371734
Summary:
layout.js used to be run before any containments were added. This was
broken in a697d291 which creates desktop containments for that activity
first.
However, some scripts rely on being able to alter global configuration
before any containments are loaded.
In order to allow the same functionality we need to provide a new hook
for whatever these scripts may need to do.
BUG: 371704
Test Plan: Not done yet.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: apol, mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3220
Summary:
Setting the screenpool primary screen changes the mapping of ID ->
connector. We need this to be done before the
DesktopView::setScreenToFollow is called because otherwise it will save
lastScreen with the wrong ID.
CCBUG: 370711
Test Plan:
Hot swapped primary, both things swapped.
Restarted Plasma
Things restored as I think they should be.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3098
when a screen goes away, screenToFollow can die for a short instant,
the view will be shortly killed but we don't want to access screenToFollow()
in the meantime
we don't want
BUG:371201
Summary:
In the show event the Wayland implementation does not pick up the shadow
at all.
BUG: 368885
Test Plan: Shadow on Wayland, not tested on X11
Reviewers: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3109
Summary:
This makes use of requests to hide and show autohide panels from
kwayland
BUG: 369386
Depends on D3007
Test Plan:
autohide panel now works, with D3080 in kwin, but windows can
cover panel still needs work
Reviewers: graesslin, #plasma
Reviewed By: graesslin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3084
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
Summary:
restore the missing panel properties:
alignment
minimum length
maximum length
offset
also, allow non integer values for the measures (height, min/max, offset)
BUG:368074
BUG:367918
Test Plan:
dumped a config with a custom panel, different height/alignment/offset etc
started a new plasma session with that l&f package, restored panel correctly
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3021
Summary:
PanelView::restore sets various properties including length, thickness,
which would result in panel resize and repositioning. PanelView::restore
also explicitly calls PanelView::positionPanel and ::resizePanel.
This results in positionPanel and resizePanel operation being done
multiple times at startup/adding panel and hence flicker when panel
first shows up. This patch makes resizePanel and positionPanel no-op if
we are restoring panel.
Test Plan: Added panel, restored panel, moved around panel
Reviewers: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3008
Summary:
the check that was there, screen id not being more
than screen count is not valid anymore with the
screenpool approach, a screen id can be bigger than
the screen count in cases such as middle screen of a 3 screen
system disabled, or driver change (in which unfortunately,
connector names can change)
without this, a new containment was created for each startup.
BUG:369665
Test Plan:
created a puroposefully corrupted plasmashellrc file,
where one known screen has a big number as id.
without patch a new containment is added in appletsrc each time
with the patch it behaves fine.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3006
Summary:
resize(size()) does not no-op in QWindow, and actually processes the
resizing. This performs a check that the action is valid.
Test Plan: Resized my panel, all seemed to still work.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3001
Summary:
Also change positionPanelTimer to not call positionPanel() manually as
restore already does this.
Test Plan: Bshah
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3000
Summary:
after the latest activities refactor, containments weren't
deleted anymore upon activity deletion.
Test Plan:
created and deleted activities while monitoring how appletsrc file
was updated
Reviewers: ivan, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2967
Summary:
When moving panel between two screens there is time when panel is on
edge of screen and screenToFollow is null, at this point if any of the
resize or position operation gets triggered, it will attempt to get
screenToFollow's size or geometry and will result in crash as for
sometime screenToFollow is null.
This is quite a timing related bug, if you manage to move panel in time
there would be no crash otherwise there are 3-4 different crashes are
possible.
To solve this we avoid setting null values for screenToFollow, this
should not happen ideally, but setting breakpoint on setScreenToFollow
shows that null value is set from QML and should be investigated.
BUG: 369228
Test Plan:
moved panel around like crazy, can't reproduce crash on
QScreen::size or QScreen::geometry, without patch it would crash 100%
Reviewers: mart, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2970
Summary:
If we don't pass the current screen to QCursor::pos, it will return
position relative to primary screen, which obviously won't be in panel
geometry.
Instead pass it currentScreen, this way we don't filter out the mouse
events for panel.
BUG: 368790
FIXED-IN: 5.8.1
Test Plan:
added debug statements and verified that I get correct screen position
and as well, panel is now interactive on secondary screen.
Reviewers: mart, graesslin, #plasma, sebas
Reviewed By: graesslin, #plasma, sebas
Subscribers: sebas, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2960
Summary:
during a type switch
if the new containment gets saved before getting a view,
it will get lastScreen=-1 so the next boot
it will create a new containment
Test Plan:
switched repeatedly between desktop and folderview
the config file always got with the correct lastScreen=0 entry
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2966
Summary:
on first startup all the desktop views already exist after the
script has been executed, so check the screen doesn't already have
a view for that screen before creating one
BUG:368891
Test Plan: tested both first and subsequent startups, one desktopview per screen created, containment config dialog coming up (and only one of them)
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2885
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