Summary:
We need to destroy the root WindowPixmap together with all of its
children; otherwise, buffers that are attached to subsurfaces will
not be released.
Test Plan:
weston-subsurfaces doesn't quit with an error message saying that
all buffers are held by the compositor.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28145
Summary:
This may help with debugging why compositing is suspended.
CCBUG: 418951
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28139
Summary:
xdg-shell stable has been around for quite a while. A quick analysis
showed that many distros ship GTK and Qt that support both xdg-shell
v6 and stable. Therefore, we can drop support for legacy v6 protocol.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: apol, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28118
Summary:
Lately, submitting patches has become very annoying because of cppcheck's
false positive error messages. After doing some research, no reasonable
solution have been found to this annoying problem so let's get rid of the
.arclint file. If we've missed something during the code review, our CI
will spot it. Although CI doesn't check spelling, we have other ways to
detect typos, e.g. EBN.
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28119
There's some X11-reliance in Toplevel which is ideally split out but for now let's check for info being null.
For instance, accessing pid() on a deleted Wayland client can crash when it's no longer a XdgShellClient.
Differential Revision: https://phabricator.kde.org/D28101
Summary: No need to keep them around for no reason.
Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28062
Summary:
The "default" button was behaving the same as "reset" which was unnecessary and confusing.
As the only settings are the list of rules, the only meaning "default" could have is to clear all the rules, which is probably not what the user would want. So I think the best course of action is to remove the button.
Reviewers: zzag, meven, crossi, bport, ervin
Reviewed By: zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28071
Summary: The code contains duplicate includes.
Test Plan: Open the files from the patch
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28048
Summary:
This will save the copy of some objects, especially PaintData classes that are
not copy-on-write.
It also follows the practice on other parts of the system.
Test Plan: Running it right now
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28031
Summary:
Prevents warnings such as :
org.kde.kcoreaddons: Expected JSON property "X-KWin-Exclude-Listing" to be a single string. but it is a bool
Reviewers: #kwin, ervin, bport, cross, hchain, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28018
Summary:
Previously we connected the hasTabletModeSwitchChanged to the
tabletModeAvailableChanged which meant that in startup once libinput
signaled us that we have switch, we would toggle that we now have a
tablet mode.
But, we were connecting this to wrong signal, as a result tablet mode
would become available, but actual tablet switch inputspy was never
getting registered, so tablet mode events were silently ignored.
Test Plan:
tested on Dell Inspiron 7000 laptop where tablet mode switch
is available
Reviewers: zzag
Reviewed By: zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27975
Summary:
This allows GtkConfig daemon to properly sync decorations buttons order for GTK CSD applications.
For 5.18.3
Test Plan:
1. Launch `kcmshell5 kwindecoration` and any GTK CSD app alongside
2. Change order of the buttons.
3. Window button order should be changed in GTK CSD app immediately (if `xsettingsd` is installed).
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27904
Summary:
We have duplicated code in InternalClient and XdgShellClient to create
decorations. In order to get rid of the code duplication, this change
introduces a method that AbstractClient subclasses can call to create
a window decoration.
Test Plan: Tests pass.
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: apol, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27822
Summary:
For some reason there m_settings is null there, don't crash in this case.
The code definitely contemplates the possibility since it's null by default and on some DecorationBridge::reconfigure() paths.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, anthonyfieroni, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27809
Summary:
The new method provides a generic way for destructing clients. Notice
that we can't just delete clients because we may need to discard
temporary window rules, which is usually done in destroyClient().
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27821
Summary:
Currently, we have only one shell client type - XdgShellClient. We use
it when we are dealing with Wayland clients. But it isn't really a good
idea because we may need to support shell surfaces other than xdg-shell
ones, for example input panel surfaces.
In order to make kwin more extensible, this change replaces all usages
of the XdgShellClient class with the AbstractClient class.
Test Plan: Existing tests pass.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27778
Summary:
Since Qt::KeypadModifier is set only for keypad keys and not the NumLock
key, we need to press at least one keypad key to determine whether
numlock is actually on. On the other hand, we know that when numlock is
on, the corresponding LED is also on. So we could check the LED rather
than press two keys.
Test Plan: testKeyboardLayout passes.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27789
Summary:
This functionality will instead be implemented in KScreen such that manual and
automatic output rotation can be used and configured through a single UI in
unison together.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin, bshah, davidedmundson, zzag
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D26036
Summary:
If we know that we are going to disobey resize increment and aspect ratio
geometry hints, then there is no point for trying to constrain the client
size according to those hints. Just return early.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27031
Summary:
Clarify that AbstractClient::minSize() and AbstractClient::maxSize()
specify the minimum and the maximum client size.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D26829
Summary:
Currently, there are a couple of issues with sizeForClientSize(). First
of all, we have a method called clientSizeToFrameSize() which does similar
thing except applying geometry constraints and checking window rules. The
other issue is that sizeForClientSize() is doing a bit too much, it checks
window rules, it applies a bunch of geometry constrains. Sometimes it
does not perform conversion between client sizes and frame sizes!
This change attempts to address those issues by replacing sizeForClientSize
with two similar methods and changing semantics of some methods of the
X11Client class.
The most significant difference between sizeForClientSize() and the new
methods is that neither constrainClientSize() nor constrainFrameSize()
check window rules. This is up to users of those methods. In many places,
we don't have to check window rules because we check isResizable(),
which returns false if the frame size is enforced by a window rule.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D26828