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
Summary: BUG: 390499
Test Plan:
See callgrind in bug report
Added debug in the relevant section, unplugged a monitor. Saw my output
Reviewers: #plasma, broulik
Subscribers: jtamate, mart, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10538
Summary: All things we need exists in the top level CMakeLists
Test Plan: Compiles
Reviewers: #plasma, bshah
Reviewed By: #plasma, bshah
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10544
ECM, when requiring ECM >=5.38, sets CMAKE_*_OUTPUT_DIRECTORY, so the
tests executables are no longer generated in the current binary dir.
Calling add_test() with the signature
add_test(<name> <command> [...])
will not result in any further processing of the <command> argument,
it will be executed as is. Using instead
add_test(NAME <name> COMMAND <command> [...])
will result in <command> getting some handling, cmp. CMake docs:
"If <command> specifies an executable target (created by add_executable())
it will automatically be replaced by the location of the executable
created at build time."
Which is what is needed now here (and also used in ecm_add_test).
Summary:
To test if the panel is under the cursor we used:
if (geometry().contains(QCursor::pos(screenToFollow()))) {
Unsurprisingly in wayland we don't know the cursor position once it's
left our window. Behaviour seems to be undefined.
We were already using enter and leave events to start the autohide
timer, so we may as well rely on that for tracking state too.
BUG: 377838
Test Plan:
Tested mouse in, mouse out
Tested mouse in and waiting and panel stayed open
Tested opening wifi applet and closing it
That will trigger the restoreAutoHide method as an applet status changed
The panel stayed open because the mouse was on it.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10101
This fixes opening panel controller while an applet config dialog was open.
It would find that we want to show config for a panel but find a config is already open, so it would just close it,
even though it was not the panel controller (which should be toggleable) but another applet config.
While at it restructure if statements a bit.
Differential Revision: https://phabricator.kde.org/D9799
Summary:
The DesktopView replaces the default ConfigView for itself with a
specialised ContainmentConfigView. It's only loaded by the desktop, and
is more of a Desktop-ConfigView than generic containment.
The system tray applet doesn't show it's own config, but instead shows a
config of its internal system tray containment by overriding the
configure action.
This causes the desktop view to mistakenly shows it's specialised
desktop config view when the system tray is configured.
This patch adds an explicit check on the containment type.
Test Plan:
Clicked on sys tray settings on desktop
Clicked on normal desktop settings
Clicked on sys tray settings on panel
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9526
Summary:
Plasmashell literally never checks the X screen, but we expose it in
this scripting system.
This patch Hardcodes it to the values you'd have on a normal system.
The existing screenCount is unchanged and will still work.
Test Plan: compiles
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9174
Summary:
in the wallpaper config dialog
there was custom code duplicating listing of kpackage, just wrong
(if the same wallpaper was installed in more than one place, the
config file qml was taken from the one with least priority)
Test Plan:
wallpaper dialog works again with qresource based packages
also they load the proper config ui qml file when more than one
instance of plasmashell is installed
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9237
Summary:
Setting a window icon is surprisingly costly and a decent chunk of
startup time. The shell doesn't need one. The only place I could
find where this icon is visible is in the KSysguard process list :).
Some people may be reminded of this rejected request:
https://git.reviewboard.kde.org/r/128484/
But that's Plasma::Dialog in plasma-framework, which (currently)
still sets an icon. This is about the shell.
Reviewers: #plasma, davidedmundson, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9196
Summary: QUrl::fromLocalFile can't be used when packages are qrc
Test Plan: plasashell loads correctly with packages from qrc
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9176
Summary: This is the implementation of the new Plasma Corona API, as described in https://phabricator.kde.org/D8566
Reviewers: #plasma, ervin, dvratil, mlaurent, hein, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: mwolff, apol, mart, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8567
Test Plan: set backend. Didn't get an error message
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8012
This will route the event through the containment first which can then intercept it, e.g. to prevent
Escape from exiting showing desktop while renaming where it should only cancel that.
CCBUG: 352988
Differential Revision: https://phabricator.kde.org/D7630
This allows the config UI to know when to enable the Apply button.
Currently we only do that when the shortcut or actions themselves change but not their configuration.
Differential Revision: https://phabricator.kde.org/D6443