during l&f switch, use destroy() which does a proper cleanup
and gives applets time to react to destroyedChanged, so we're sure they
properly cleaned up their states.
This among other things makes the in-app menubar work again when the
user switches from a style with a global menu bar to one without
Summary:
the culript seems the Qt::WindowDoesNotAcceptFocus flag,
removing it makes it possible to have back working text fields in the
panel
Test Plan: works with an ad-hoc applet, notes applet needs fixing
Reviewers: #plasma, #kwin, davidedmundson
Reviewed By: #plasma, #kwin, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21319
Summary:
The actual mask is now queried from the panel, there is no more need
for this.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: davidedmundson, mvourlakos, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21013
Summary:
The mask of a panel depends on things like borders set or window size,
but nothing else on it. So it should be updated as last in the queue of
things to update.
There might be still state changes not properly propagated, but this is
a move in the more expected direction.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21012
Summary:
Plasma themes might define non-full-rect shapes for panels (e.g. round
borders for panels not filling the whole width/height).
The old code tells the window manager to blur the full rect of a panel
window, resulting in unwanted artifacts around the panel shape for
non-full-rect themed panels.
With the Panel.qml item of the desktop packages exposing some optional
"panelMask" property now, we can query for the shape and only use the
painted area when telling the window manager where to blur behind or
changing the background contrast.
This also follows the logic as already applied for dialogs or other window
elements like tooltips which are rendered using a Plasma theme.
Test Plan:
The Oxygen Plasma theme no longer has blurry corners on panel edges.
Also still works as before when using non-composing window manager.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D20204
Summary:
Older Plasma themes, which are still offered also for current Plasma 5 e.g.
from store.kde.org, are missing out "shadow-*" elements for
"widgets/panel-background". The old code of the PanelShadows class does not
handle that case though, and as result for X11 sets a _KDE_NET_WM_SHADOW
property with "0" for most of the pixmaps due to them being an empty pixmap
in at least one dimension (except for the emtpy corner pixmap which is
always 1,1). The resulting behaviour with current KWin (X11) is this:
* when starting a Plasma shell with a theme without panel shadow elements,
KWin does not show shadows
* when switching from a theme with shadow elements to one without, the
shadow of the previous theme is continued to be used.
Reason is that KWin when parsing that property cancels the parsing when it
comes across a "0"/null id for a shadow pixmap, without further error
handling, so either does not create a shadow or keeps the old.
This patch catches the case of themes without any panel shadow elements and
only sets the _KDE_NET_WM_SHADOW property or wayland shadow if there are
shadows, otherwise removes them if needed.
Test Plan:
Switch between Plasma themes with and without separate shadow elements
defined (e.g. Breeze <-> Fluffy Bunny).
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D20051
Summary:
load() is called a few times and different states. After the change I
also get the warning on a regular load.
This patch returns early whilst we're in the loading state, but still
prints the warning should kactivitymanagerd fail.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18922
I got "#define HAVE_X11 TRUE" and errors because of that where #if was
used.
This also obeys the logic that HAVE_X11 is set (in the toplevel
CMakeLists.txt) not only when X11_FOUND but also when XCB is found.
Summary:
Ran into this gotcha the other day, and it was impossible to resolve
without code debugging.
Reviewers: #plasma, bshah
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18493
The desktop view isn't visible in the task bar, tabbox, and neither does it have a window decoration.
Differential Revision: https://phabricator.kde.org/D18430
Summary: makes sure the flag is set on time
Test Plan: can't get the panelcontroller in the taskbar anymore
Reviewers: #plasma, hein, broulik
Reviewed By: #plasma, hein, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18186
Summary: As requested in D12041.
Test Plan:
Opened dialog
With kpackagetool installed an awesome wallpaper that showed some fireworks
Combo box updated immediately
Uninstalled
Combobox updated
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: Zren, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15178
Summary:
On Wayland, if some border is disabled, we don't attach corresponding
empty tile. Yet, we set offset of 1 for that border.
KWin relies on offset values to calculate bounding box for shadows.
For example, if a panel has only top border enabled, then the bounding
box will be 2 pixel wider(and 1px taller) than it should be. This can
result in having 1px thin artefacts on neighboring screens.
In general, we don't have to attach empty tiles for disabled borders.
Thus, we can set corresponding offsets to 0.
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D14999
Summary:
If a user logged in with one screen connected plugs in
a second screen, which becomes the new primary screen,
this screen would stay black or behave weird.
Unplugging the screen again would mess up plasmashell.
Added to ScreenPool::setPrimaryConnector():
In the case primary output changed m_idForConnector
doesn't contain the new primary, so a screen mapping
is created for it.
Test Plan:
Testing on virtualbox or vmware player seems impossible, because
these don't allow disabling the first display (VGA-1) and booting
with the second (VGA-2) only.
1. Boot machine with one screen connected to HDMI-3 (primary output).
2. Log in
3. Plug in second screen to HDMI-2:
--> primary output changes from HDMI-3 to HDMI-2
4. OSD appears: extend to right
--> Without this patch, the new screen (HDMI-2) would stay blank.
--> With this patch applied, the screen content moves to the new
second screen.
5. Unplug second screen (HDMI-2)
--> Without this patch, the background would get black, control panel
would disappear, could only be restored by restart of plasmashell
--> With this patch applied, screen content moves to the right and
works
Reviewers: #plasma, mart, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13853
Summary:
If a slot or Q_INVOKABLE has a QVariant as parameter and gets called
from a QJSEngine's script, it receives a QJSValue wrapped as QVariant.
To get a QVariant with the actual value wrapped, calling QJSValue::toVariant
is necessary.
I'm not entirely sure whether this is intentional behaviour of QJSEngine, but
even if it's a bug we'll have to workaround it.
BUG: 397338
Test Plan: I have favorites in kickoff again.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D14822
It takes almost 30ms here to create the engine and then we usually don't end up using
it as all update scripts had already been processed in the past.
Differential Revision: https://phabricator.kde.org/D14751
Summary:
On X, this is entirely useless.There's a special code path in create for
windowType == Desktop and in ::setGeometry it doesn't seem to help/hinder.
It's not like we need WM_NORMAL_HINTS for a WM to resize us.
On wayland it's downright destructive.
On the second setGeometry call the QPA bounds the new geography to the
current min/max (from our previous screenGeometryChanged). But updating
the min/max doesn't update our geometry. End result is our screen is
off.
Test Plan:
Resized screen on Wayland. Wallpaper now filled exactly instead of being broken
Resized screen on Xcb. Wallpaper still filled the screen precisely
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13850
Summary:
Port plasma desktop scripting to qjsengine, removing every trace of QScript from plasma-workspace.
The scripting is 100% API compatible.
the bindings are partly done on the javascript part as some things are only possible there and not on the QJSEngine part:
* setting AppInterface as the globalobject's __proto__ with property getters that are evaluated every time
* setting functions that act as constructors (using newQMetaObject gives way more complex and uglier c++ code in Containment, as the scriptengine is not immediately accessible)
* a QRectF wrapper which exposes all properties and methods that were exposed in the previous implementation
Test Plan:
* some manual api test from the interactive console
* tested both from the desktop console and first start with some pretty complex layouts from lnf packages (the default one, netrunner, united, elpas)
* tested every property/methos of the qrectf wrapper
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13112