Commit Graph

14658 Commits (440d49da0059fc06550088543eaa6357df583b50)

Author SHA1 Message Date
Martin Gräßlin 440d49da00 [autotests/integration] Test case for screen locked with mod-only-shortcuts
Currently expected failures as modifier only shortcuts don't check
for locked screen yet.
2016-08-16 08:19:45 +02:00
Martin Gräßlin 4651aa1d79 [wayland] Unset focused keyboard surface when handling key event internally
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
2016-08-16 07:40:59 +02:00
Martin Gräßlin 1111b9c98b Trigger global shortcuts also on key-repeat
Summary:
Restores feature parity with X11. Global shortcuts need to trigger
also for repeat events. An example is the volume key or screen
brightness.

For other shortcuts like showing yakuake it does not make sense to
trigger on repeat. Thus a long term solution is to add a flag to
global shortcuts whether the key should trigger on repeat.

BUG: 366608

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2413
2016-08-15 17:39:01 +02:00
Martin Gräßlin 142aab2e24 Introduce an EffectsHandler::animationsSupported -> bool
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
2016-08-15 17:38:33 +02:00
Martin Gräßlin bfb2094c0a [autotests/integration] Fix TestLibinputDevice::testName
sysName may not be empty. Set a different name.
2016-08-15 17:21:45 +02:00
Martin Gräßlin a9ac2739f7 [autotests/libinput] Set a valid sysName by default
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.
2016-08-15 16:55:10 +02:00
Martin Gräßlin ab5d31426a [libinput] Expose all input devices through DBus
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
2016-08-15 16:10:50 +02:00
Martin Gräßlin 8bbd53a774 [wayland] Properly implement minimize of ShellClient
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
2016-08-15 16:10:11 +02:00
Martin Gräßlin bd58d7792f Don't trigger modifier only shortcuts if pointer interaction
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
2016-08-15 16:09:03 +02:00
Martin Gräßlin 3a730fa51e Merge branch 'Plasma/5.7' 2016-08-15 16:07:50 +02:00
Martin Gräßlin 71c996fe33 Select also raw button press/release in XInput2 based polling
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
2016-08-15 16:06:30 +02:00
Martin Gräßlin 490eaadb83 Turn ScreenLockerWatcher into a KWIN_SINGLETON
It's created together with input, so that the input mechanismn already
has a way to check whether screen is locked.

Effects doesn't hold a member variable any more and instead uses the
singleton instance.
2016-08-15 08:37:24 +02:00
Martin Gräßlin d2a3a10802 Split ScreenLockerWatcher into dedicated source files
Being able to monitor whether the screen is locked is useful not only
to the effects system but overall in KWin. Thus to make it possible to
use it from more locations as a first step it's moved into dedicated
source files.
2016-08-15 08:16:33 +02:00
l10n daemon script 81d0454147 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-08-14 11:55:28 +00:00
Martin Gräßlin 03f66b02c3 [autotest/integration] Add pointer axis events to ModifiersOnlyShortcutTest
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.
2016-08-13 15:15:54 +02:00
Martin Gräßlin 280663fede [autotest/integration] Add pointer button events to ModifiersOnlyShortcutTest
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.
2016-08-13 15:09:21 +02:00
Martin Gräßlin fcd9a15186 [autotest/integration] Add a test case for modifier only shortcuts
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.
2016-08-13 14:35:01 +02:00
Martin Gräßlin 83d8181675 [libkwinglutils] Revert version hack for Qualcomm Adreno on libhybris
The idea to set proper version is good, but it results in epoxy
thinking it does not have the entry points and terminating KWin.
2016-08-12 15:46:55 +02:00
David Edmundson 6c8f0e6cc0 Include setOnActivity in the test 2016-08-12 13:21:09 +01:00
David Edmundson 628fe79d3e Fix activites_test check
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.
2016-08-12 13:21:09 +01:00
David Edmundson 0dd927c4a4 Validate activities in setOnActivities
Summary:
This fixes a bug I had where Session Management restored a window on an
activity that didn't exist that, meaning I was unable to access it.

setOnActivity() already has this check

BUG: 362620

Test Plan:
Using my broken session, restored and got my ghost process back
on all activities

Added a window to activity 2, checked it came back there and
only there.

Reviewers: #plasma, graesslin

Subscribers: ivan, luebking, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D1982
2016-08-12 13:19:28 +01:00
Martin Gräßlin b14618994b [autotests/integration] Add a first test case for activities
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.
2016-08-12 12:52:47 +02:00
Martin Gräßlin 5ea88effee Implement addDamage in Unmanaged
For Xwayland Unmanaged needs to override the addDamage method and
update the repaints_region accordingly, otherwise the repaint is not
triggered for the Unmanaged window.

Reviewed-By: bshah
2016-08-12 11:32:48 +02:00
Martin Gräßlin b4c6b4b35d [libkwinglutils] hasGLVersion uses GLPlatform for verison check
Summary: No need to parse the OpenGL version twice with different algorithms.

Reviewers: #kwin, bshah

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2414
2016-08-12 10:14:49 +02:00
Martin Gräßlin a5c8356d40 [libkwineffects] Add detection code for Qualcomm Adreno to GLPlatform
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
2016-08-12 09:59:38 +02:00
Martin Gräßlin 79641df928 [autotests/libkwineffects] Add test data for Adreno 330
This is the device used in Nexus 5 and reference for Plasma Mobile.
The output is with using libhybris on top of hwcomposer backend.
2016-08-12 09:16:28 +02:00
Martin Gräßlin 7586394b81 [autotests] Don't try to load StartupFeedbackEffect on GL compositor
The test terminated cleanly as it tried to load a shader which obviously
fails.
2016-08-12 08:24:43 +02:00
Martin Gräßlin ec596519c6 [autotests/integration] Add test case for minimizing active ShellClient
When minimizing an active ShellClient it should become inactive.
This is not the case as the test case shows through expected failures.

CCBUG: 366634
2016-08-11 17:08:08 +02:00
Martin Gräßlin cd6d82fcbc [libinput] Add device configuration for tap-drag-lock
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.
2016-08-11 16:32:00 +02:00
Martin Gräßlin 02cf9e8a64 [libinput] Add support for tap and drag
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.
2016-08-11 16:02:26 +02:00
Martin Gräßlin 00f3f990d6 [libinput] Use macro for the standard boolean config setters
Less code duplication
2016-08-11 15:41:06 +02:00
Martin Gräßlin e18e2eb57c [libinput] Rename Device::tapEnabledByDefault to tapToClickEnabledByDefault
Slightly more descriptive name what the feature is about.
2016-08-11 15:18:40 +02:00
Martin Gräßlin 2f7298bed5 [libinput] Add support for tapToClick configuration
New property added to Device which allows reading and setting the
tap to click configuration.
2016-08-11 15:13:36 +02:00
Martin Gräßlin 079095beea Adding more frameless hints
The internal window can be decorated really broke a few things...
2016-08-11 08:45:41 +02:00
Martin Gräßlin 4a16bbbe46 Support triggering application launcher through screenedge
Summary:
Now that we have a dedicated dbus call to show the application launcher
we can also expose it through the screenedges.

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2394
2016-08-10 20:39:28 +02:00
Martin Gräßlin 7bca270f97 Force windows of type desktop to be opaque
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
2016-08-10 15:10:22 +02:00
Martin Gräßlin 9b30cfef1d Launch Plasma's launcher menu on meta modifier only shortcut by default
Summary: Invokes org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.activateLauncherMenu.

Reviewers: #plasma, #kwin, hein

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2357
2016-08-10 15:09:49 +02:00
Martin Gräßlin eed4bf32ae Cache the clientSize in DecoratedClientImpl
Summary:
So far whenever the window geometry changed the widthChanged and
heightChanged signals were emitted even if they did not change.
E.g. while moving a window this resulted in the signal being emitted
after every step, although from decoration point of view nothing
changed.

The decoration performed costly tasks like re-layout the window buttons.

With this change the client size is cached and the widthChanged signal
is only emitted if the width actually changed. Same for heightChanged.

This results in the decoration only re-layouting the buttons if the
window is resized horizontally. All other geometry changes no longer
result in a re-layout.

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2389
2016-08-10 14:22:19 +02:00
Martin Gräßlin 089059aba3 Don't trigger decoration repaint when ShellClient geometry changes
The geometry change will trigger an update through the signals on the
decoration anyway. Thus a dedicated repaint is not needed.
2016-08-10 14:21:39 +02:00
Martin Gräßlin 09ba49e401 Only focusToNull when activating a ShellClient
ShellClient::doSetActive calls into focusToNull to deactivate active
windows on X11. But this should only be done when activating a
ShellClient. When deactivating a ShellClient the focusToNull can
result in an activated X-client to lose activation.

Thus this change ensures that focusToNull is only performed for a
now active ShellClient.

Reviewed-By: bshah
2016-08-10 14:19:12 +02:00
Martin Gräßlin dad7004dbb Add an OpenGL information tab to Debug Console
Summary:
The new tab shows the information from GLPlatform similar to how it is
shown in the supportInformation. In addition it also lists all available
openGL and EGL/GLX extensions. For that kwinglutils is extended by
functions to return the lists of extensions.

Reviewers: #kwin, #plasma, bshah

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2385
2016-08-10 08:27:36 +02:00
Martin Gräßlin 915af29886 [qml/outline] Outline shall be a frameless window
Was missing the hint. Caused kwin_wayland to crash.
2016-08-09 16:38:19 +02:00
Martin Gräßlin b3d41ee0f3 Add missing break in virtualkeyboard.cpp 2016-08-09 16:09:22 +02:00
Martin Gräßlin 19b5c2e418 Make virtualkeyboard a frameless window
We don't want that KWin tries to add a window decoration to it.
2016-08-09 15:51:06 +02:00
Martin Gräßlin c789ce808b [effects] Disable Blur and BackgroundContrast on software emulation
On llvmpipe it's better to have them disabled.

Reviewed-By: Marco Martin
2016-08-09 14:56:13 +02:00
l10n daemon script 8f4f7e6eb0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-08-09 10:09:21 +00:00
Martin Gräßlin 4cdb078376 [autotest/libkwineffects] Add more test data for glplatformtest 2016-08-09 08:40:37 +02:00
Martin Gräßlin 1e13c5ad8f [autotests/libkwineffects] Test GLPlatform::driverToString and chipClassToString 2016-08-09 08:30:09 +02:00
Martin Gräßlin 0778cab42d [autotest/libkwineffects] Add more test data for the glplatform test
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.
2016-08-08 17:40:04 +02:00
Martin Gräßlin a79dc5585a [libkwineffects] Fix includes in kwingltexture.h
The header used GL types like GLenum without including gl through
epoxy.
2016-08-08 15:46:25 +02:00