Summary:
There was a property change for whenever a window gets activated although
that doesn't change the state.
In addition a nullptr check for rootInfo is added for the future no
XWayland case.
Test Plan:
run xev -root to verify the property does not get updated
needlessly
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7097
Summary:
KWin passes the current keysym converted to a Qt::Key in the QKeyEvent.
The current keysym does not always change when a key gets released, so
when pressing a shortcut the release carry a Qt::Key which could be
considered as wrong.
QtWayland transforms the actual pressed/released key into a keysym and
passes that through the QKeyEvent. This change does the same for the
internal windows. A new QKeyEvent is created and adjusted in a way that
it matches what Qt expects.
Why not change everything to how Qt expects it? The key is used at
various places and in KWin internally we expect the behavior how it is
currently implemented. So it's better to use Qt's expectation only when
interacting with Qt.
Also the change carries a workaround for a bug in QKeySequenceEdit
(see QTBUG-62102) and transforms Super to Meta. As this adjustment only
makes sense for the internal windows we need to send in an adjusted
QKeyEvent anyway, so another argument for using the Qt behavior only in
this place.
Test Plan:
Can set a shortcut on Wayland and it can be used to activate
the window.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6828
Summary:
Based on the work of 3f4995fb9b this change
introduces a GlxContextAttributeBuilder to make the requesting of context
attributes cleaner, more verbose and less error prone copy and paste.
Test Plan:
Switched between Core and legacy and verified the output;
extended auto test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6411
Summary:
Workspace monitors the X11 events to detect when the user first
interacts with the system. This is only required on X11 for activating
the same client from previous session. So far this was spread over many
parts in the long event switch statement. To make this more contained a
dedicated event filter is introduced which also gets deleted again once
the first user interaction got recognized.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7371
Summary:
Split from the last review, as in order to track output's removed (in
any way that's useful) the registry needs to be on the heap and the change grew.
Test Plan:
Every test that previously passed on my system still does
Though currently that's not every test (for some reason) which was
my main motivation for splitting.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7377
Summary:
Turn Xkb into a QObject
Reduced dependencies on other classes and allows to emit signal directly
instead of emitting a signal on another class.
Dependency inject KWayland::Server::SeatInterface into Xkb
No need to depend on WaylandServer from within Xkb.
[autotests] Add test case for Xkb::toQtKey
Tests all key codes KKeyServer is able to map to Qt.
Migrate Xkb::toQtKey away from KKeyServer
The regression in kwindowsystem in
32526718eae99ccb594360627586eebdf793372b showed once more that it's time
to migrate the xkb keysym to Qt::Key mapping away from KKeyServer. The
main problem with KKeyServer is that it's made for X11 and we don't have
X11 here. This causes warnings printed at runtime and the code only
works by accident at all because KKeyServer fails to initialise
modifiers. That is normally KKeyServer would include the modifiers, but
that is nothing we are interested in for mapping xkb keysyms to Qt::Key.
So to address this, KWin now implements the mapping itself. It's based
on the implementation in KKeyServer, but also improved by providing
faster xkb to Qt conversion (which matters for KWin more than the other
direction).
Long term plan is to extend this so that also on X11 it can be used.
Then it should be split out and be used in KKeyServer as a replacement
for the current implementation which could support both X11 and Wayland.
Test Plan:
New test case added which covers all keysyms supported by
existing KKeyserver mapping
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7336
Summary:
With ddf3536f19 a regression got
introduced resulting in Client::captionChanged not being emitted if
Client::setCaption was called without the force parameter.
The regression is only in master branch.
BUG: 383444
Test Plan: Added test case passes
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7290
Another random failure on build.kde.org (see T6546). This tries to use
QTRY_COMPARE on the SignalSpy's count instead of a wait in the hope that
this can handle the multi-threaded situation better. Though it might
also be possible that the other thread just didn't run in the 5 sec we
waited.
The KWindowSystem change 32526718eae99ccb594360627586eebdf793372b caused
a regression in KWin as Qt::Enter on keypad is no longer enter, but enter
with modifier mask. For all other modifiers it was never a problem that
the KKeyServer method also returned modifiers as it could not read the
X modifiers anyway.
As KWin has full knowledge about the modifiers through Xkb it does not
need the modifier mapped into the Qt::Key.
This fixes the failing TestWindowSelection autotest which started to fail
due to the change in KWindowSystem.
Summary:
The OverlayWindowX11 also inherits from X11EventFilter and performs
the filtering itself.
Test Plan: Compiles, not yet tested as I'm on Wayland
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7197
Summary:
The overlay window is only needed for the X11 based compositors. Given
that it is better suited in the X11 platform. Unfortunately it is not
possible to completely move it into the platform plugin as it is still
referenced in KWin core (e.g. SceneXRender). Due to that the
OverlayWindow in KWin core is turned into a pure virtual class with the
implementation being moved into the plugin.
The platform API gains a new virtual factory method which is only
implemented in the X11 platform.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7193
Summary:
The generation of the shortcut caption part is moved from Client to
AbstractClient. The ShellClient also has a captionSuffix and implements
the full part in caption.
Overall this needs more refactoring to support more sharing between the
two implementations. But one step at a time.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7093
It failed on CI. A possibility is that the wait for the quick tile
changed took to long, so that the next wait already passed and thus
failed. Instead of wait a QTRY_COMPARE on the size of the signalspy.
Summary:
So far EffectsHandlerImpl directly accessed SceneQPainter::painter
through a dynamic cast. If in future the QPainter based compositor should
be moved into a plugin we cannot access it through a dynamic cast.
To solve this problem the painter method is moved into Scene as
a virtual method returning a sane default value.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7214
Summary:
So far EffectsHandlerImpl directly accessed SceneXrender::bufferPicture
through a dynamic cast. If in future the XRender based compositor should
be moved into a plugin we cannot access it through a dynamic cast.
To solve this problem the bufferPicture method is moved into Scene as
a virtual method returning a sane default value.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7207
The StrutsTest is constantly aborting on build.kde.org and lots of
OpenGL stuff in output. This could indicate a problem with the Outline
as the failing test could trigger the Outline. So let's try to disable
it.
Summary:
For a future XFree KWin. Only remaining not guarded usages are in
Workspace::init, but that one needs to be refactored anyway for
becoming X free.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7173
Summary:
cap_deco was only used in the caption with stripped arg case which was
unused and thus removed. Now cap_deco is completely unused.
Due to that we can also remove the stripped client script which only
manipulated the cap_deco.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7077
Summary:
If ClientConnection fails to get the process id (which happens at least
on FreeBSD) the process id is 0. We should not try to terminate this pid
as it terminates all processes is KWin's process group which is the whole
session.
Test Plan: Only compile test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7168
Summary:
The buffer for a XWayland window is larger than the actual size. Thus
we need to use the clientSize as reference, not the buffer size.
BUG: 382748
Test Plan: Test passes
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6952
Summary:
The parameter is not used anywhere in KWin. Only the default value was
used. So let's drop this.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7059
Summary:
Currently only done for X11 clients, should also be done for Wayland
client.s
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6892
Summary:
Comparing a pure blue square isn't a very effective test as someone
cropping the image will still pass.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6982
Although we made KWin compile with newer include requirement for major
and minor in gnu libc, we still get the warning that it's deprecated.
So let's try to turn the include order around. That should fix the
warning and hopefully still compile on non gnu libc (e.g. FreeBsd). If
it fails, we need to add a cmakedefine for the header.