Commit Graph

13510 Commits (07414e88a5dca8abe00e555b9ea94189b429a5c6)

Author SHA1 Message Date
Martin Gräßlin 07414e88a5 Add support for modifier only shortcuts on Wayland
On popular demand!

This change tracks how modifiers are used and detects a modifier only
key press/release. That is:
* no other key is pressed when the modifier gets pressed
* no other key gets pressed before the modifier gets released

If such a press/release is detected, we call a configurable dbus call.
The possible shortcuts can be configured in kwinrc, group
"ModifierOnlyShortcuts". The following keys are supported:
* Shift
* Control
* Alt
* Meta

As value it takes a QStringList (comma seperated string) with
service,path,interface,method,additionalargs

E.g. to invoke Desktop Grid effect on Meta key:

[ModifierOnlyShortcuts]
Meta=org.kde.kglobalaccel,/component/kwin/,org.kde.kglobalaccel.Component,invokeShortcut,ShowDesktopGrid

I do not intend to add a config interface for it. Let's keep it a hidden
way.

REVIEW: 124954
2015-09-09 08:58:43 +02:00
Martin Gräßlin f6f555d688 Merge branch 'Plasma/5.4' 2015-09-08 08:42:07 +02:00
Martin Gräßlin 0b95561193 Fake a leave event for the decoration when client is left
We need to send a fake HoverMove event on minimized to remove all
hovered states of the decoration.

At the same time we need to ensure that no further hover events are
sent to a minimized client.

BUG: 351984
FIXED-IN: 5.4.1
REVIEW: 124997
2015-09-07 15:27:06 +02:00
Marco Martin 658a28a257 support OnScreenDisplay from wayland 2015-09-03 18:19:38 +02:00
Marco Martin d3053fab58 support the kwayland contrast protocol
support wayland as well in the background contrast effect
REVIEW:125035
2015-09-03 17:00:24 +02:00
Jonathan Riddell 1ade154034 Update version number for 5.4.1
GIT_SILENT
2015-09-03 10:56:12 +01:00
Marco Martin 3f5bf65a9e Use the kwayland blur protocol in the blur effect
use the new blur protocol to fetch information about the
region of blur behind to apply to windows like Plasma::Dialog
REVIEW:125017
2015-09-02 14:43:44 +02:00
l10n daemon script 5eb8fc28b2 SVN_SILENT made messages (.desktop file) 2015-08-31 13:32:03 +00:00
l10n daemon script 3bcd24b009 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"
2015-08-31 11:22:32 +00:00
l10n daemon script c0716491ac SVN_SILENT made messages (.desktop file) 2015-08-28 12:34:25 +00:00
l10n daemon script ba3d4228f5 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"
2015-08-28 10:22:49 +00:00
Thomas Lübking f477480237 Merge branch 'Plasma/5.4' 2015-08-27 22:54:11 +02:00
Thomas Lübking 0c71d514ce blur transparent 24bit windows
also stretch blur opacity a bit (ie.
slightly transparent windows get more
blur compared to their opacity)

REVIEW: 124148
2015-08-27 22:22:50 +02:00
Thomas Lübking 9139cca72c never trigger edges during the cooldown
regardless of whether the pushback is forced down or the user
has deactivated it or whatever. The edge is waiting from previous
activation and we need to prevent immediate reactivation since that
may cause duplicate action and unwanted state toggles

BUG: 351627
CCBUG: 351869
FIXED-IN: 5.4.1
REVIEW: 124888
2015-08-27 22:21:14 +02:00
Thomas Lübking b5e3e4ac4c tests test tests, not code
The test put a reference to the XCB::Window as data
to the _net_wm_transient property, not the window ID
This "works" (you get various garbage transients for
the leader in addition) as long as the window id itself
is the first item in the structure (because that is what
the test resolves to verify what it has done) bug fails
when the XCB::Window structure changes and anything
is the first item (or, btw., when the compiler feels
to re-align the structure and adds some padding...)

So let's fix the test by at least passing the proper
data reference.

is FIXED-IN: 5.4.1
REVIEW: 124888
also see REVIEW: 124864
2015-08-27 22:20:16 +02:00
Thomas Lübking 0f4c51936e Use shader traits for magnifer effect
adapted from the zoom effect patch which
was broken likewise in KWin/5

REVIEW: 124942
2015-08-27 22:17:27 +02:00
Martin Gräßlin f280d36f8d [cmake] Let's try PKG_Qt5PlatformSupport_INCLUDEDIR instead of PKG_Qt5PlatformSupport_INCLUDE_DIRS
The one contains a set of paths which might be the reason why e.g on the
CI the include dir cannot be constructed. Let's see what will happen....

CCBUG: 351776
2015-08-27 09:35:51 +02:00
l10n daemon script e148fc5bc9 SVN_SILENT made messages (.desktop file) 2015-08-26 12:42:36 +00:00
l10n daemon script 3c96b23c17 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"
2015-08-26 10:22:10 +00:00
l10n daemon script c8ec8ceae2 SVN_SILENT made messages (.desktop file) 2015-08-25 14:56:19 +00:00
Martin Gräßlin f0f8421cef [qpa] Use QPlatformIntegrationFactoryInterface_iid for Q_PLUGIN_METADATA
Makes it work with both Qt 5.4 and Qt 5.5.
2015-08-25 14:33:51 +02:00
Martin Gräßlin abb9bf1355 [wayland] Create event dispatcher in QPA plugin
We no longer need to have the event dispatcher created before starting
the QApplication, thus we can leave it to the QPA plugin to creat it.

Also we don't need to implement our own dispatcher any more but can
use one from Qt5PlatformSupport as we link it anyways. The special
need for dispatching the WaylandServer is no longer needed as we can
explicitly dispatch it from the QPA plugin if needed.
2015-08-25 14:33:51 +02:00
Martin Gräßlin a10be8a7d7 [qpa] Dispatch Wayland server before trying to find a ShellClient
Ensures that all pending events are processed and we actually have
created the ShellSlient.
2015-08-25 14:33:51 +02:00
Martin Gräßlin ef20f82b4d [wayland] Create waylandServer after creating QApplication
Our QPA plugin does not require a running Wayland server at startup,
so we can move the startup after creating the application.

Nice side effect: --help works now.
2015-08-25 14:33:51 +02:00
Martin Gräßlin f034537ad7 [wayland] Drop workaround on Qt window expose event
No longer needed with our own QPA plugin.
2015-08-25 14:33:51 +02:00
Martin Gräßlin 9afbecf4a6 [wayland] Drop workaround for faking frame rendered for Qt windows
No longer needed with our own QPA plugin.
2015-08-25 14:33:51 +02:00
Martin Gräßlin 8add14fe89 [wayland] Drop hack for faking input for Qt popups
This reverts 29c2ae57.
2015-08-25 14:33:51 +02:00
Martin Gräßlin 28b48e69fb [wayland] Add repaints on geometry changes 2015-08-25 14:33:51 +02:00
Martin Gräßlin 296313b2fc Keep Qt::Popup windows as internal pointer window once they leave window
A click outside a popup should close the popup and not be passed to the
window at the pointer position. Thus we only update the internal pointer
window if the internal pointer window does not represent a visible
popup.
2015-08-25 14:33:50 +02:00
Martin Gräßlin afd76b80ee [wayland] Send QKeyEvent to internal windows
Allows to navigate in e.g. Useractions menu.
2015-08-25 14:33:50 +02:00
Martin Gräßlin cd0e905248 [wayland] Drop QT_WAYLAND_DISABLE_WINDOWDECORATION env variable
No longer needed as we don't use the Wayland QPA.
2015-08-25 14:33:50 +02:00
Martin Gräßlin cc27042a7b [wayland] Drop threaded eglInitialize hack
The hack to perform the first eglInitialize in a thread is no longer
needed, as our internal QPA plugin is either able to share the
EGLDisplay or performs the potentially blocking eglInitialize in a
thread.
2015-08-25 14:33:50 +02:00
Martin Gräßlin e90fc1f8e1 [wayland] Drop QtWayland specific BypassWindowManagerHint workaround
No longer needed as our internal QPA is able to show windows with
BypassWindowManagerHint set.
2015-08-25 14:33:50 +02:00
Martin Gräßlin e0103b15b7 [wayland] Remove the specific socket pair for QtWayland
Our own QPA plugin shares the internal connection, so we don't need the
dedicated connection for the QPA any more.
2015-08-25 14:33:50 +02:00
Martin Gräßlin 4851470ff9 [wayland] Enforce our internal QPA plugin as QT_QPA_PLATFORM 2015-08-25 14:33:50 +02:00
Martin Gräßlin 26b3569a0b [wayland] Add a QPA plugin for kwin_wayland
This introduces an own QPA plugin for KWin. QtWayland's plugin is not
a good solution for KWin as QtWayland is meant for Wayland clients and
not for a Wayland server. Given that it makes more sense to have a very
minimal QPA plugin which supports the use cases we actually have.

With our own QPA plugin we should be able to improve the following
areas:
* no need to create Wayland server before QApplication
* Qt::BypassWindowManagerHint can be supported
* no workaround for creating OpenGL context in main thread
* sharing OpenGL context with Qt
* OpenGL context for Qt on libhybris backend

The plugin supports so far the following features:
* creating a QPlatformWindow using KWayland::Client (ShellSurface)
* creating a QPlatformBackingStore using a ShmPool
* creating a QPlatformOpenGLContext with Wayland::EGL
* or creating a QPlatformOpenGLContext which shares with KWin's scene
* creating a QPlatformScreen for each KWayland::Client::Output
* QPlatformNativeInterface compatible to QtWayland
2015-08-25 14:33:50 +02:00
Martin Gräßlin 79317717c8 [wayland] Export ShellClient
Need to access it from our QPA plugin.
2015-08-25 14:33:50 +02:00
Martin Gräßlin c56bbc0ddf Composite windows from a QOpenGLFramebufferObject
This change introduces a mechanism for internal windows to be rendered
to a QOpenGLFramebufferObject to be composited using the texture bound
to the FBO. This is useful for in-process rendering (e.g. QtQuick) and
at the same time bypassing the windowing system.

The OpenGL context of the QOpenGLFramebufferObject needs to be sharing
with the compositing OpenGL context.
2015-08-25 14:33:50 +02:00
Martin Gräßlin d837830661 [wayland] AbstractBackend announces whether a surface less context is possible
In an own QPA plugin we want to make the OpenGL context sharing with
our compositing context and bypass the windowing system for OpenGL
windows. In order to achieve this we need a surfaceless context.

The AbstractBackend now forwards whether such a context can be created on
the EGLDisplay used by the Compositor.
2015-08-25 14:33:50 +02:00
Martin Gräßlin b9d7726f7a [wayland] Forward EGLDisplay and EGLContext from Scene to Backend
AbstractBackend can forward the egl display and context, so that
it can be used from other parts.
2015-08-25 14:33:50 +02:00
Martin Gräßlin 9272d01a2d Add a WaylandServer::findClient which takes a QWindow
Of course only works with internal clients.
2015-08-25 14:33:50 +02:00
Martin Gräßlin f76c18bfb8 Add SceneOpenGL::backend() const -> OpenGLBackend*
A way to get to the actual backend used by the compositing scene.
2015-08-25 14:33:50 +02:00
Martin Gräßlin a9e5343eb6 [wayland] Use an event thread for the internal Wayland connection 2015-08-25 14:33:50 +02:00
Martin Gräßlin 6294961ba4 [wayland] Keep Registry for internal connection around
Allows to interact with the Registry for the internal connection in
other parts of KWin and makes it possible to create more than just the
ShmPool for this Registry.
2015-08-25 14:33:50 +02:00
Thomas Lübking 7b1000385c Merge branch 'Plasma/5.4' 2015-08-24 21:59:16 +02:00
Thomas Lübking a97b6e0fd6 delete the quit process, not UserActinsMenu
BUG: 351643
FIXED-IN: 5.4.1
REVIEW: 124895
2015-08-24 21:58:49 +02:00
Martin Gräßlin f7925c586e [tabbox] Support wayland in establish/remove TabBoxGrab
We cannot grab keyboard/mouse through X means, so don't even try, but
mark as grabbed.

With this change the TabBox shows on Wayland.
2015-08-24 11:44:05 +02:00
Martin Gräßlin 304ac3ac84 [tabbox] Split areModKeysDepressed into X11 and Wayland variant 2015-08-24 11:43:39 +02:00
Martin Gräßlin 6b95705f24 [libinput] Don't change default log level
With this change libinput is less noisy and only prints errors to stderr.

In addition one could install a dedicated log handler and forward to
qCDebug and friends.
2015-08-21 14:38:57 +02:00
Martin Gräßlin f183c6f9df Merge branch 'Plasma/5.4' 2015-08-21 12:18:56 +02:00