when the containment (or an applet in it)
gains the state Plasma::AcceptingInputStatus
force the focus to the panel window, restoring
the behavior of Plasma4
BUG: 364276
I noticed that panels had borders on all sides and it turns out PanelShadows was never
actually told which sides should have shadows.
To reduce code duplication I expose the enabled borders as property to the Panel.qml
which itself does the same calculation from QML again and does it many times.
Differential Revision: https://phabricator.kde.org/D1756
QX11Info::connection() looks up the connection in the QPA.
The Wayland QPA happens to have a property with the same name,
so it happily reinterpret_casts a wl_connection_t* to xcb_connection_t*
and disaster ensues.
Differential Revision: https://phabricator.kde.org/D1718
The newly introduced HiddenStatus which is used by eg. the desktop pager to completely
hide itself when there is only one virtual desktop, has a higher value than
RequiresAttentionStatus for ABI compatibility reasons, so auto-hide was never actually
enabled if you had this applet (part of the default setup) with just one virtual desktop.
BUG: 362105
FIXED-IN: 5.6.5
Differential Revision: https://phabricator.kde.org/D1683
Summary:
starting the stuts timer in resize/move events means we don't have to
litter it across any code that might move/resize the panel, also we get
event compression for free (so could probably remove the timer in
future).
Much neater and fixes a bug.
BUG: 362887
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1584
My second (internal) screen is disabled and has 0x0 size.
This fixes setting the struts for panel and correctly calculating
the available desktop area.
CCBUG: 348043
Differential Revision: https://phabricator.kde.org/D1238
Summary:
cache screenGeometry in local var
replace size().width() with width()
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1171
the panel geometry is intersected with the QScreen geometry,
that doesn't work with rects of empty sizes.
This fixes the panel sometimes being positioned at 0,0 at startup
Don't save and restore panel length
length gets overriden from the QML side so there is no point loading and
restoring it.
This also simpifies code somewhat removing places where we clearly did
the same bit of code twice.
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
Summary:
If the window's platform surface was destroyed, there is also
no shadow to be removed.
Both X and Wayland code will try to create the platform surface
again, and it will lead to crash in other code that doesn't expect
platform surface to be created when the containment is being deleted.
This fixes crash in PanelConfigView::event when removing panels.
Reviewers: graesslin, #plasma
Reviewed By: graesslin, #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D951
Summary:
Since Qt 5.5 there is a dedicated event when a PlatformSurface gets
created. This allows us to know when we need to setup the Wayland
integration.
Reviewers: mart
Subscribers: plasma-devel
Differential Revision: https://phabricator.kde.org/D819
this manages the new systray: if a config for a containment is asked,
treat it like an applet if it's not the actual panel containment
behavior is not changed for anything else
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
The basic design of Plasma is that scripts and and the shell (in theory)
manipulate a tree of basic applet geometry and configs.
Plasmashell then reacts to those changes and displays them visually with
a distinct separation between the layout and UI.
Panel's scriptengine seemed to do away with all, and try and manipulate
the graphic object directly..which might not exist and that leads to
complex code.
This changes it to read/write from the same config object as
PanelView will use. More akin to how the script engine for applet and
contiainment works.
If there's a view for this panel, we update immediately, otherwise it'll
just get loaded when it's needed. PanelView::reload() has the error
checking/bounds management so no point duplicating that.
BUG: 355918
REVIEW: 125921
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
Last patch has a reggression due to QtQuick issue (only on Xcb):
QEvent::Leave is triggered after QEvent::MouseButtonPress Qt::LeftButton
BUG: 354651
REVIEW: 126331
Turns out that this method is sometimes called at the time where the
virtualGeometry() is invalid -- which sounds pretty much like a Qt bug,
but it isn't exactly the first bug in screen handling in Qt5. Rather
than producing values which are surely invalid, try to cover up the
mess.
REVIEW: 126216
Currently we're hitting a bug where the panel won't be displayed in the
correct position because of how the screen it's in is computed. See:
https://codereview.qt-project.org/#/c/139533/
This patch makes sure there's no off-by-1 issues by placing the screen
initially at the center.
Use KWin to lower/raiser panel in windows can cover mode with edge
activation like autohide does.
This means if you have a maxmised menu you can still open the panel by
moving the mouse to the bottom of the screen
BUG: 343448
Calls updateStruts on KScreen::Screen::currentSizeChanged instead of
KScreen::Config::outputAdded/outputRemoved.
When an output is (dis)conencted, it isn't added/removed, it is mearly
marked as (dis)connected. Therefore, updating struts on
outputAdded/outputRemoved doesn't work.
BUG: 349400
REVIEW: 124996
PanelView::event() generates new events and sends them to itself via
QCoreApplication::sendEvent(), which calls the event() handler directly. To
prevent possible stack overflow, we use QCoreApplication::postEvent() to
dispatch the events from event loop.
REVIEW: 124375
We don't want the compositor to position the panel, thus we pass the
recommended position through the PlasmaShellSurface interface. The
compositor may or may not honor the passed position.
REVIEW: 124056
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
at startup the panelviews can't exist yet: panelviews have to be created
after desktopviews and the script has to be executed before the desktopviews
exist.
it's a bit hackish, but use temporary dynamic properties to store those
values that will be then used as soon the panelviews are created
Appearantly right() / bottomRight() / topRight() returns values with 1
pixel x off for historical reasons and hence 1px gap. This causes the
autohide panel not hiding automatically.
BUG: 339323
BUG: 340549
FIXED-IN: 5.3
REVIEW: 123136