Summary: Fixes a regression where displays would not be available to kscreen.
Test Plan: Can configure my screens again.
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28243
Summary:
Screens is used in screenEdges in a recent refactor
This didn't affect wayland as main_wayland creates screens earlier
itself. We can't move creation into main_x11 as X11's screens uses an
event filter which relies on workspace existing.
BUG: 419178
Test Plan: Restarted on X11
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28233
Summary:
We are testing on a 100x100 mock display. We'd ask QWidget for our
display's dpi, it would not use the mock display but the actual
system's. On my system it made the corners overlap with each other and
all sorts of weird things happened.
Test Plan: The tests actually pass here.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28224
Summary:
Instead of changing lifespan of kwayland objects we can just call
create() and delete() on it which affects the lifespan of the underlying
resource, but not the kwayland wrapper.
This gets rid of some duplicate syncing.
Test Plan:
Ran WAYLAND_DEBUG=1
plugged in and removed a monitor
output showed wl_output and xdg_output being handled correctly
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27899
Summary:
By the time AbstractClient::setupWindowManagementInterface() is called,
it's possible for a window to already have an application menu, and not update them
afterwards.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28150
Summary:
Uses the tablet classes introduced in kwayland.
Depends on D26858
Test Plan:
Scratched my tablet with a magic stick and it did things depending on the pressure.
https://youtu.be/GGx0TlNJlzs
Reviewers: #kwin, #plasma, zzag, davidedmundson
Reviewed By: #kwin, #plasma, zzag, davidedmundson
Subscribers: davidedmundson, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D26859
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