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
Summary: This then invokes the relevant KCM when clicked
Test Plan:
Forced software rendering, saw SNI
restarted, saw SNI
set "never show again". It hid itself
Restarted. It remained hidden
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: alexeymin, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12679
Summary:
If we cannot create a GL context, instead of showing an error and
quitting, switch to using the QtQuick software renderer and restart.
If software mode is already set, then show the error as before. This
could happen in the case of the software renderer not being installed.
Test Plan:
After doing some driver changing, I ended up with the annoying "plasma can't start"
message.
Without the entry in kdeglobals I now start plasma and it seamlessly comes up
working.
Reviewers: #plasma
Subscribers: mart, broulik, graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11722
Summary:
DesktopView contains a property candidateContainments which are all containments with the same screen for all activities.
Plasma mobile can use it to do activity switching with a swipe gesture
replaces D11333
Test Plan:
tested with gesture based activity switching in plasma mobile including creating and deleting
of activities
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12351
Summary:
with new corona containment query functions in D11361 the data
copy done in m_desktopContainments is no more necessary: this should
make things a bit more simple and robust
Test Plan: launched plasmashell, tried to add/remove activities and screens, all keeps working
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11801
Summary:
Calls the existing quit signal on a running plasma then tries to start
in the normal way.
It's meant partly to make my own development workflow a bit easier, but
also to make it one less line on bugzilla when I want people to give me
debug output.
Test Plan:
Ran with existing plasma running
Ran without an existing plasma running
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12092
Summary:
As discussed the env variables are no longer exported. Thus Qt
applications follow the default qpa platform they are compiled with and
thus still function if they are packaged with a Qt without QtWayland.
Plasma's internal processes pick the qpa platform depending on the
session type as well as our flatpak apps.
KRunner and Plasmashell are adjusted to not leak the env variable they
set for themselves.
Test Plan:
Started a wayland session, verified with KWin's debug console
that plasmashell and krunner are wayland. Launched kwrite from both plasma
and krunner and verified that it's xcb
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11447
Summary:
Original decision didn't really have a rationale:
https://git.reviewboard.kde.org/r/125648/
It's causing bugs in people doing somewhat sensible things.
BUG: 380347
If widgets are locked, the script will still fail when it tries to do
something it can't.
Reviewers: #plasma, broulik
Subscribers: mart, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11375
Summary:
This is a preparation step to unset QT_QPA_PLATFORM from the wayland
startup session script. Setting QT_QPA_PLATFORM breaks 3rd-party Qt
software which does not bundle QtWayland. Most prominent example is
the Qt installer itself (see
https://bugreports.qt.io/browse/QTBUG-60222).
On the other hand our Plasma workspace applications need to be forced to
Wayland on a Wayland system. So we have a conflict between we want to
set QT_QPA_PLATFORM and we don't want to set QT_QPA_PLATFORM.
This change adds new API to KWorkspace to address this problem. The new
method adjusts the QT_QPA_PLATFORM based on the XDG_SESSION_TYPE
enviornment variable. It is completely opt-in. Meaning applications need
to explicitly add the call prior to creating the QGuiApplication and if
the user specifies either QT_QPA_PLATFORM env variable or any of the
-platform command line argument variants, the platform detection is
skipped.
The change also adjusts all plasma-workspace applications which should
use Wayland on Wayland to use the new API. The startup script on the
other hand still sets QT_QPA_PLATFORM. We also have applications outside
of plasma-workspace which needs this detection. Examples are:
* powerdevil
* systemsettings
* kinfocenter
Once this change is merged those applications can be adjusted by linking
against PW::KWorkspace and afterwards QT_QPA_PLATFORM can be unset from
startplasmacompositor.
Test Plan: See added autotest
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10816
Summary:
Wallpaper plugins were storing their configurations in the same config
group, overwriting each other's values.
Test Plan:
0. Apply revision D11194 (plasma-desktop).
1. Right-click the desktop and click Configure Desktop.
2. Select Wallpaper Type -> Plain Color. Click the chooser button
and select green. Hit Apply.
3. Select Wallpaper Type -> Picture of the Day. Click Background
Color button and select red. Hit Apply.
4. Select Plain Color type again. The color should still be green.
Reviewers: #plasma, mart, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11195
I noticed in GammaRay there were two QQmlEngine instances in a Plasma session and found this.
Differential Revision: https://phabricator.kde.org/D10774
Summary:
CCBUG: 358231
CCBUG: 342056
Even the icon with the number of tasks pending moves from time to time.
To reduce the frozen time, a similar patch must be applied also to
frameworks/kwindowsystem src/platforms/xcb/kxmessages.cpp
frameworks/plasma-framework src/plasma/private/effectwatcher.cpp
According to the documentation (and a look to the source code)
http://doc.qt.io/qt-5/qabstractnativeeventfilter.html
The type of event eventType is specific to the platform plugin chosen
at run-time, and can be used to cast message to the right type.
On X11, eventType is set to "xcb_generic_event_t", and the message can
be casted to a xcb_generic_event_t pointer.
The other eventType are "windows_generic_MSG" and "mac_generic_NSEvent".
No other eventType starts with an 'x'.
Test Plan:
Cut & paste 2000 small files.
Before, a freeze (plasmashell not responding) of minutes
After, a freeze of seconds
Reviewers: #frameworks, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10627