Creating a dedicated method for the leave event on client.
This restructuring of the test should hopefully work around the
failing test condition on build.kde.org.
If the screen is locked the modifier only shortcuts should not trigger.
Also if the screen gets locked while a modifier is hold the shortcuts
should not trigger.
Reviewed-By: bshah
This extends the test helper for locking the screen and unlocking the
screen to also wait for the ScreenLockerWatcher to have that state.
This is going to fail on build.kde.org as we don't have EGL there and
the greeter crashes. This needs an extension to fake that we have a
screen lock window.
Summary:
So far when KWin intercepted a key event a leave was not sent to the
Wayland surface currently having keyboard focus. This could result in
the Wayland application to start repeating keys. E.g.
1. application gets key press event
2. This triggers an internal window to show
3. key release goes to KWin internal window
4. application starts to repeat key as there is no release
With this change whenever KWin intercepts the key event e.g. due to
* internal window
* Effects grabbing key event
* Tabbox
the focused keyboard surface is set to null, thus triggering a leave
event and the client not starting to repeat the event.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2402
Summary:
A new method to tell the effects system whether the compositor scene
is able to drive animations. E.g. on software emulation (llvmpipe) it's
better to not do any animations at all.
This information can be used by effects to adjust their behavior, e.g.
PresentWindows could skip transitions or effects can use it in their
supported check to completely disable themselves.
As a first step all scripted effects are considered to be unsupported
if animations are not supported. They inherit AnimationEffect and are
all about driving animations.
The information whether animations are supported comes from the Scene.
It's implemented in the following way:
* XRender: animations are always supported
* QPainter: animations are never supported
* OpenGL: animations are supported, except for software emulation
In addition - for easier testing - there is a new env variable
KWIN_EFFECTS_FORCE_ANIMATIONS to overwrite the selection.
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2386
The autotests are failing on build.kde.org due to the generated DBus
object path not being valid. This might be due to sysName having been
empty by default.
Summary:
The Connection exposes a new service called org.kde.KWin.InputDevice
and every Device registers an own object exposing all properties.
This allows an external configuration tool to change the behavior of
the devices at runtime. E.g. to test configuration settings.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2407
Summary:
We need to call Workspace::clientHidden when minimizing. Otherwise
Workspace doesn't update the active client and the now minimized
window is still active.
BUG: 366634
Test Plan:
Test case works now and also tested in nested setup that
active window changes.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2410
Summary:
If the user clicked a pointer button or scrolled a pointer axis the
held modifier was most likely intended to modify the pointer event.
Thus the modifier only shortcut should not be triggered.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2435
Summary:
The mouse polling is also used to detect mouse button press/release
events. This is used e.g. by the MouseClickEffect. The XInput2 filter
only selected for Raw Motion events which means mouse button events
are missed in case it's not combined with a motion.
This change makes the input filter also select for raw button press
and release events. To support this the X11EventFilter needed to
be adjusted to support multiple generic event types to filter for.
BUG: 366612
FIXED-IN: 5.7.4
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2406
If a pointer axis is scrolled while a modifier is hold, the modifier only
shortcuts should not trigger. The user wanted to use the modifier for the
pointer axis.
This is not implemented yet, thus all is QEXPECT_FAIL.
If a pointer button is pressed or gets pressed while a modifier is
hold, the modifier only shortcuts should not trigger. The user wanted
to use the modifier for the pointer button.
This is not implemented yet, thus all is QEXPECT_FAIL.
This test verifies the functionality of modifier only shortcut
activation. The base test case uses a helper object which is exported
to DBus and has a slot which can get triggered.
The test configures the individual modifiers to call that DBus method
when the shortcut is triggered. It simulates pressing the modifier and
verifies the DBus method was invoked or not.
client->isOnActivity("foo") will return true if the client is on no
activities, as that's the equivalent of saying we are on all activities.
In our case we do want to check activities() shows the right thing.
Verifies the condition from D1982 with expected_fail. That is sets
a Client on non existing activities and expects that it should be on
all activities.
Summary:
The Qualcom Adreno classes are recognized and a version detection
workaround is added for libhybris which only announces GLES version 2
although GLES version 3 is supported. KWin at least used to work with
GLES version 3 which gives us e.g. framebuffer blit.
Reviewers: #kwin, bshah
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2415
From libinput documentation:
Also optional is a feature called "drag lock". With drag lock disabled,
lifting the finger will stop any drag process. When enabled, libinput
will ignore a finger up event during a drag process, provided the finger
is set down again within a implementation-specific timeout.
From libinput documentation:
A tap immediately followed by a finger down and that finger being held
down emulates a button press. Moving the finger around can thus drag
the selected item on the screen.
Summary:
Plasmashell's desktop windows are RGBA which forces the compositor to
perform blending and render the background. That is absolutely pointless
as there is no window behind the desktop window it could blend to. All it
does is destroying KWin's more optimized code path and forcing additional
rendering which will never be visible (including shader push/pop).
With this change KWin forces desktop windows (both X11 and Wayland) to
be considered as opaque by setting the depth to 24. Thus blending is
disabled and the background is not rendered.
Test Plan:
Verified with apitrace that KWin goes in the opaque rendering
path for desktop windows.
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2382
Example data harvested from bugs.kde.org: open bugs against kwin with
a comment containing supportInformation.
We can see that especially detecting modern radeon gpus is not working.
Summary:
With this change KWin can create window decorations for internal windows.
Thus it's also possible to move internal windows and resize them which is
especially important for the debug console.
Reviewers: #kwin, #plasma_on_wayland, sebas
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2371
So far KWin's pointer surface enter handling was:
1. update fouced surface
2. update the global position
On client side this resulted in:
1. Enter with incorrect coordinates
2. move event to correct coordinate
With QtWayland this results in the case of multiple surfaces in one
application that Qt doesn't properly process the enter event and the
Window never getting pointer focus and not reacting on any pointer
input events.
The root problem is that the KWayland server API is not ideal for
supporting this situation. There is an API call for setting the global
position (which causes a pointer motion for the focused surface) and
an API call to update the focused surface. But a combination for both
is (still) missing.
This change addresses the problem by first unsetting the entered surface,
then updating the global position and afterwards setting the new surface.
Thus the position is correct. While this needs to be made better in
KWayland, this is an urgency bug fix to get the behavior correct and thus
first working around the API deficit and not first extending in KWayland.
Reviewed-By: bshah
The test LockScreenTest::testPointerButton and testPointerAxis both
fail on Neon's CI infrastructure. In order to make the test more reliable
the tests first wait for the pointer enter after unlock before simulating
another button press.
The test LockScreenTest::testPointerButton and testPointerAxis both
fail on Neon's CI infrastructure. In order to make the test more reliable
the tests first wait for the pointer enter after unlock before simulating
another button press.
Summary:
Gesture events are swipe or pinch events on a touch pad.
This change implements basic support by:
* wrapping them in LibInput::Event
* processing them in LibInput::Connection and emitting
dedicated signals
* Forwarding them in InputRedirection to PointerInputRedirection
* Support them in the internal input event filter
* Printing debug information in DebugConsole
Further handling is not yet done. In future the following should be
implemented:
* activating e.g. zoom and present windows on pinch/swipe gesture
* forwarding non global gestures to KWayland
Note that forwarding to KWayland is not yet useful as QtWayland does
not yet have support for the unstable protocol. No Qt application could
make use of it yet. So for the moment just global gestures is the best
we can get.
Test Plan: Looked at output of DebugConsole when triggering gestures
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2359
The new test can load "profiles" from kconfig files in the test data.
Based on that the glGetString return values are mocked and GLPlatform
can perform detect without having to interact with a real GL library.
That way we can verify that the detect code works correctly. As a first
test the settings of one Intel/IvyBridge is included. More tests can be
added easily (e.g. looking at various supportInformation output in
bugs.kde.org). Also this allows to more easily add detect code for GPUs
we do not know yet. And to simulate conditions where the detect code
failed resulting in no compositing at all.
So far KWin's pointer surface enter handling was:
1. update fouced surface
2. update the global position
On client side this resulted in:
1. Enter with incorrect coordinates
2. move event to correct coordinate
With QtWayland this results in the case of multiple surfaces in one
application that Qt doesn't properly process the enter event and the
Window never getting pointer focus and not reacting on any pointer
input events.
The root problem is that the KWayland server API is not ideal for
supporting this situation. There is an API call for setting the global
position (which causes a pointer motion for the focused surface) and
an API call to update the focused surface. But a combination for both
is (still) missing.
This change addresses the problem by first unsetting the entered surface,
then updating the global position and afterwards setting the new surface.
Thus the position is correct. While this needs to be made better in
KWayland, this is an urgency bug fix to get the behavior correct and thus
first working around the API deficit and not first extending in KWayland.
Reviewed-By: bshah
Summary:
This fixes a regression introduced with a1afeded6a.
The connections were setup every the windowShown signal got emitted.
This caused effects to get multiple singals and start multiple animations
which then do not get cancelled correctly.
The incorrect behavior was most visible in the translucency effect which
did not cancel the move animation and the window stayed translucent.
BUG: 366081
Test Plan:
New test case which simulates the behavior of the translucency
effect.
Reviewers: #kwin, #plasma, sebas
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2346
The capability tablet tool is new in Libinput 1.2. As build.kde.org
does not yet support this version, it's only an optional check.
So far the code only detects whether the capability exists and reports
this accordingly.
A new sub-directory scripting is added in autotests/integration to
gather all test cases related to scripting.
The first added test case verifies the activation of screen edges. For
that it loads a helper script, which reserves an edge based on config.
When the edge is triggered showing desktop is activated.
Summary:
This change ensures that KWin doesn't crash in the QPainter scene if
the compositor gets restarted and if there are Wayland clients.
BUG: 365471
Test Plan:
Test case added to scene qpainter which triggers a restart
of the Compositor with a window being shown. Verifies that rendering
is correct afterwards.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2185