This is an update to c95ddb7102 and
implements the emit of maximized changed in deocration like on Client.
Overall the code looks like it should be merge better together with
Client.
Reviewed-By: kbroulik
Summary:
From the famous category: "How could that code ever have worked".
Maximized state changes were never passed to window decorations. For
X11 windows the decoration updated the state nevertheless, for Wayland
windows the state did not get updated, thus a maximized window had
borders and was shown with a not maximized button.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D1805
If we get a compositingToggled because the Compositor is going down we
don't need to recreate the Renderer as KWin as a whole is going down.
Thus we disconnect the compositingToggled connection when the Compositor
is about to be destroyed.
Summary:
Toplevel::window() is the actual X11 window. This makes it difficult
to use as the generic identifier for both X11 and Wayland. The Wayland
ShellClient already had a windowId() which is now added to Toplevel as
a virtual method. On X11 (Toplevel default) it returns the window().
The method window() now returns XCB_WINDOW_NONE for classes without
the Toplevel::m_client, such as ShellClient. Thus it allows to properly
check whether we are on Wayland or X11.
The code is adjusted to use windowId where a generic id is needed and
to properly check whether the window is valid before using it where
a window() is used.
This also fixes at least one additional unknown issue in
Workspace::setActiveClient
where the windowId of a Wayland client was passed to X11.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1527
Summary:
The delay to next cycle dance is needed for Aurorae. Maximizing a
window can result in the decoration being destroyed, in which case
QtQuick can trigger a crash.
A test case is added to simulate the situation and ensure that maximize
still works also after the change.
BUG: 362772
FIXED-IN: 5.6.5
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1586
Summary:
KWin needs the plugin id of the breeze decoration plugin. Instead
of hard coding that it's now resolved through an optional dependency.
If the optional dependency is not available, the default is adjusted
to aurorae/plastik.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1344
We announce support for it and depending on whether we have a plugin
or not set the default mode to Server or None.
When a decoration interface is created it gets installed on the
ShellClient. But there it isn't properly used yet as we don't have
support for decorations in ShellClient yet.
The option NoPlugin allows to disable window decoration plugins. It
used to exist with the old decoration library but got unfortunately
lost during the switch.
This change brings back the option and also allows runtime changes
of the option.
REVIEW: 124708
When kdeglobals doesn't exist, QStandardPaths::locate() for it returns
an empty string, so the check in previous fix doesn't work in this case.
This change sets m_colorScheme properly in this case and also creates an
empty kdeglobals(needed because QFileSystemWatcher can't monitor
non-existing files) so kdeglobals can be reloaded if it is later
populated.
REVIEW: 123399
Currently, if a color scheme lacks the WM group, DecorationPalette
doesn't load it so we can fallback to kdeglobals color scheme. If
kdeglobals doesn't have WM group we get black decorations.
This change will always load the kdeglobals color scheme even if it
is missing WM group.
REVIEW: 123320
Adapt to API changes introduced by b62e8888cd39301e00ad98dfe791fa66676408fb.
It adds DecoratedClient::color(group, role) for getting colors that are
not included in QPalette. Breeze used to read these colors from
kdeglobals, breaking per window color schemes. KWin now handles reading
these colors along with QPalette loading with DecorationPalette.
REVIEW: 122883
If the configured decoration plugin fails to load, we try to load
the default decoration plugin. If that also fails to load, we try
to load Aurorae, which is shipped with KWin, so the chances are
higher that it is available.
Also the checks in Aurorae are improved to fall back to the Plastik
theme if the selected SVG theme is not available.
BUG: 341014
FIXED-IN: 5.2.0
REVIEW: 121859
* Border Sizes
* Close menu double click
Both are added to the Settings and exposed in the decoration kcm.
As it started to no longer scale the kcm uses a ui file.
Still missing:
* buttons
* custom decoration configuration
* GHNS
* search
The Compositor is destroyed before the Client and Decorations are
destroyed on shutdown. This meant the Decorations reacted needlessly
on the alpha channel supported. E.g. Aurorae recreated the Decoration
and most likely crashed in Qt.
With this change the signal gets disconnected and the Decorations
just don't do anything.
* Aurorae needs to pass QVariantList args to parent Decoration
* DecorationBridge implementation needs to be a KWIN_SINGLETON
* DecorationBridge needs to be passed with args to created Decoration
A decoration plugin can indicate that it supports themes. For this
the decoration plugin needs to specify in the org.kde.kdecoration2
group of the JSON meta data the following:
themes: true,
defaultTheme: "nameofDefaultTheme"
If the themes key/value pair is present and set to true KWin will
read the entry "theme" in the [org.kde.kdecoration2] group with the
value of defaultTheme as the default value.
The read value (if there is one) is passed to the created decoration
in the QVariantList. The QVariantList contains a QVariantMap as first
entry and the theme name is passed for key "theme".