This reverts commit 17774bc4c6
There is still a known culprit (duplicate display names) so the hack shouldn't be reverted.
CCBUG: 353975
CCBUG: 438114
(cherry picked from commit 9c7ac7061c)
This adds `m_blockRestorePreviousWindow` to avoid restoring focus to the
panel, and replace QHash with QMap to save panel orders.
CCBUG: 453166
CCBUG: 352476
Max and min are calculated from two completely different sources.
There's scope for them to not be the expected way round.
We have an assert reported on this line due to a subtle qBound ->
std::clamp porting difference on GCC with debug flags on.
BUG: 454064
These two code paths for vertical and horizontal orientations used two
different functions to clamp values. This commit makes them consistent.
Amends a3943400d5.
In panelview.cpp, the old window focus is restored when switching to
Passive status. This fixes the behavior by setting the panel status to a
status that is not AcceptingInputStatus.
BUG: 454729
CCBUG: 352476
FIXED-IN: 5.25
On multiscreen (seems to happen only on X11 so far) when screen are
added and moved, sometimes the panel gets moved by the window manager
ending up out of screen boundaries, leaving a screen without panel
a common scenario is:
laptop with external screen connected, panel on internal screen,
close the lid, everything gets moved to the external screen,
the panel will stay out of screen boundaries, but the panel struts are correct
CCBUG:438114
Allow the Panel to get active keyboard focus via a kwyboard shortcut which will cycle between all panels.
When a panel has focus, the active focus can be navigated around either with tab/backtab or arrow keys.
Simple popup applets which only display an icon will work automatically,
Complex applets like the System tray or the taskbar will have focus that can navigate on all their sub-elements, to activate a particular systray applet or activate a particular window
Co-authored with Benjamin Port<benjamin.port@enioka.com>
CCBUG: 352476
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
The fake drag-and-drop events caused by the panel reuse the real event's
mimeData, and were handled asynchronously. By the time the fake event
has been dispatched from the event loop, the mimeData may already have
been freed. Send the fake events synchronously again.
A guard is added to avoid the original potential bug of infinite recursion.
BUG: 398440
Panel struts may need to be updated when screen configuration changes,
even when the panel isn't resized or moved. Example: screen below the
panel is removed.
Currently the struts are only sometimes updated, that is when
ShellCorona::reconsiderOutputs is called. This is timing dependant since
ShellCorona::addOutput connects QScreen::geometryChange to it, and
geometryChagned signal can arrive before addOutput is called, in which
case the struts aren't updated.
I am not sure if this behaviour is intended, but it's best to not rely
on it. Instead lets just update the struts when screen size changes like
we used to.
There was a previous commit d66d6d57 that is similar, however it got
lost when the dependency on KScreen was removed.
Since now we rely on QScreen, we need to connect the QScreen signal
every time it changes, hence the change being in setScreenToFollow.
There is an error handling path when we fetch the relevant config()
```
KConfigGroup PanelView::panelConfig(...
{
if (!containment || !screen) {
return KConfigGroup();
}
```
which we indiscrimiately call parent() on.
This patch guards that case, which is presumably screen being
temporarily null.
This code is also Plasma 5.8 compatibility fallback, so arguably we
could get rid of it.
BUG: 425711
Summary:
--when the containment background hints are updated then the
panel shadows should be also. In case the background hints
point to NoBackground the panel shadows should be removed
and in case they point to DefaultBackground they should be
drawn again
--PanelShadows::removeWindow has no place in updateEnabledBorders
because the window still lives. When removeWindow was executed
before it was faulty unregistered from PanelShadows and in order for
setEnabledBorders to work again we should need
to execute from start the PanelShadows::addWindow function
FIXED-IN:5.17.3
Test Plan:
--I have created an applet which a PlasmaComponents.Switch button
and toggles panel transparency on user demand easily
Reviewers: #plasma, davidedmundson, mart
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25121
Summary:
--when the containment background hints are updated then the
panel shadows should be also. In case the background hints
point to NoBackground the panel shadows should be removed
and in case they point to DefaultBackground they should be
drawn again
--PanelShadows::removeWindow has no place in updateEnabledBorders
because the window still lives. When removeWindow was executed
before it was faulty unregistered from PanelShadows and in order for
setEnabledBorders to work again we should need
to execute from start the PanelShadows::addWindow function
Test Plan:
--I have created an applet which a PlasmaComponents.Switch button
and toggles panel transparency on user demand easily
Reviewers: #plasma, davidedmundson, mart
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25121