Commit graph

12493 commits

Author SHA1 Message Date
Hugo Pereira Da Costa
931c43b6c4 added missing .data() to make connect/disconnect compile 2014-11-04 10:37:39 +01:00
Frank Osterfeld
4dc2ad22d7 Add libepoxy's include directory 2014-11-04 10:31:03 +01:00
Martin Gräßlin
062d071fc5 [kwindecoration] Add a PreviewButtonItem to the declarative plugin
Allows to create a DecorationButton and renders a preview for it.
Very basic, doesn't forward mouse events, etc.
2014-11-03 16:12:54 +01:00
Martin Gräßlin
8dd0a8163f [kcmkwin/kwindecoration] Import a new decoration configuration module
Following features are supported:
* finds all plugins
** finds all themes for a theme-engine plugin
* renders previews for the plugin/themes
* loads currently used plugin/theme
* saves selected plugin/theme
* triggers config reload in KWin

Following features are currently not supported:
* Search
* Plugin configuration
* GHNS
* Button configuration
2014-10-31 07:53:04 +01:00
Martin Gräßlin
fcec334b3c [kdecoration] Adjust to change that DecorationBridge is no longer a singleton
* Aurorae needs to pass QVariantList args to parent Decoration
* DecorationBridge implementation needs to be a KWIN_SINGLETON
* DecorationBridge needs to be passed with args to created Decoration
2014-10-30 09:01:06 +01:00
Martin Gräßlin
69c3233ead [kdecoration2] DecorationSettings takes DecorationBridge in ctor 2014-10-29 16:51:31 +01:00
Martin Gräßlin
a7bcb70980 [kdecoration2] Adjust to DecortionSettings no longer being a singleton 2014-10-29 16:11:20 +01:00
Martin Gräßlin
8f87e18b79 [decorations] Add support for runtime switching of decoration plugins 2014-10-28 11:53:56 +01:00
Martin Gräßlin
7353bf4c28 [shadow] Needs to keep a QPointer to the DecorationShadow
The DecorationShadow might be deleted at any time, so we better
keep track of it properly.
2014-10-28 11:01:43 +01:00
Martin Gräßlin
17103c49a1 [aurorae] Add a ThemeFinder
The idea behind the ThemeFinder is to expose a way for a configuration
module to find all themes. The API is not yet finalized, thus it's just
a QObject with a Q_PROPERTY themes of type QVariantMap with key being
the user visible name and value being the internal theme name.
The ThemeFinder will have to be moved to KDecoration library.

The json metadata provides a "themeListKeyword" which is used as the
keyword to the KPluginFactory.
2014-10-28 09:57:38 +01:00
Martin Gräßlin
f94b4bec0b [aurorae] Set drawBackground property to false on visual parent
Small hint for the previewer that it shouldn't draw the background.
2014-10-28 08:17:46 +01:00
Martin Gräßlin
0778434f85 [aurorae] Add a dummy Shadow for the configuration mode 2014-10-28 08:16:53 +01:00
Martin Gräßlin
47484384ad [aurorae] Support DecorationShadow
DecorationShadow is supported through using the padding values. The
window becomes larger by the padding and gets positioned accordingly.
This requires to translate all mouse events.

The DecorationShadow is just using the complete image, which is kind of
a memory waste, but at least the SVG based Aurorae doesn't provide us
better information (might be added, but would probably need changes in
the theme).

For switching back to non-compositing we recreate the QuickWindow. It's
not fortunate, but as long as we do not yet have the render control it's
needed.
2014-10-27 12:45:05 +01:00
Martin Gräßlin
16afb24426 [aurorae] QQuickWindow needs to be a QPointer instead of a ScopedPointer
Lifetime is bound to the foreign QWindow of the decoration. Thus if that
gets destroyed our pointer becomes invalid and we need to track that.
2014-10-27 12:43:39 +01:00
Martin Gräßlin
5c3cd6f4bc Initial port of Aurorae to KDecoration2
The port to KDecoration2 means quite some changes in the way how Aurorae
works. First of all: the theme to load is passed to the Deocoration ctor
and not searched for by Aurorae itself.

The rendering mechanismn didn't change significantly yet. It's still
rendering to an FBO and passing the image on. This needs some further
work as KDecoration2 does not support the padding any more. So all
themes using shadow are currently broken.

Another big change is the way how the rendering scene is constructed
and used. KDecoration2 doesn't want the the Decoration to be a native
window. But for being able to render a QtQuick scene at all we need a
QQuickWindow. Thus it creates a window parented to the decoration id,
but not accepting any input event. Input is nowadays controlled from
the outside: events are passed into the Decoration, so we don't want
the QtQuick window intercepting events.

In case of non-composited the normal FBO mechanism doesn't work and
Aurorae just renders to the QQuickWindow directly. This could use
some optimization in the decoration renderer in KWin core to not even
try to perform the normal rendering. On the other hand it's probably
too much a hassle for the use case.

The rendering architecture might hopefully be improved with Qt 5.4
and the new QQuickRenderControl class.

The QQuickWindow also exposes a problem for preview in the
kdecoration-viewer and the future KCM: we don't want a different
window, but best would be to get to the QML scene directly. A small
hack is added to have the previewers set a "visualParent" which Aurorae
uses to parent the QML scene to without the need to create a
QQuickWindow.
2014-10-24 13:48:31 +02:00
Martin Gräßlin
6a580d2b90 Support themes in decoration loading
A decoration plugin can indicate that it supports themes. For this
the decoration plugin needs to specify in the org.kde.kdecoration2
group of the JSON meta data the following:

themes: true,
defaultTheme: "nameofDefaultTheme"

If the themes key/value pair is present and set to true KWin will
read the entry "theme" in the [org.kde.kdecoration2] group with the
value of defaultTheme as the default value.

The read value (if there is one) is passed to the created decoration
in the QVariantList. The QVariantList contains a QVariantMap as first
entry and the theme name is passed for key "theme".
2014-10-24 13:05:41 +02:00
Martin Gräßlin
7e8cce212d A mouse release event doesn't have the triggered button in Qt::MouseButtons 2014-10-23 16:49:21 +02:00
Martin Gräßlin
a104d9dc62 Call ::init() on created KDecoration2::Decoration 2014-10-23 10:59:00 +02:00
Martin Gräßlin
447fed7e37 Adjust DecoratedClientImpl to changes in DecoratedClientPrivate 2014-10-23 10:56:43 +02:00
Martin Gräßlin
c23b3ac0d8 Drop usage of DecoratedClient::handle in DecorationBridge::update
We can find the Client for the Decoration without needing to go by
the handle.
2014-10-21 08:03:23 +02:00
Martin Gräßlin
21dca7ac14 Keep a QPointer<DecoratedClientImpl> in Client
This allows to remove the internal access to the DecoratedClientPrivate
in the KDecoration API.
2014-10-21 07:46:44 +02:00
Martin Gräßlin
c0c57d7076 KDecoration2::DecorationBridge uses std::unique_ptr 2014-10-20 17:42:50 +02:00
Martin Gräßlin
e32da9d9e0 Merge branch 'master' into kdecorations2
Conflicts:
	CMakeLists.txt
	paintredirector.cpp
	scene_opengl.h
	scene_qpainter.h
	scene_xrender.h
2014-10-20 16:04:52 +02:00
Martin Gräßlin
015c59d9fd Fix build if there is no libinput 2014-10-20 15:01:12 +02:00
Martin Gräßlin
da5ee2ba93 Add sanity checks before updating pointer position and on screen changes
We don't want the cursor to leave the visible area, so better check that
the cursor doesn't leave it. And when the screens changes better check
that the cursor is still on a visible screen. If not: put it back to the
center of the closest screen.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
ff87c989ba Center initial pointer position on screen in libinput mode 2014-10-20 14:51:24 +02:00
Martin Gräßlin
2a6cd5010a Set a default cursor when creating the WaylandCursor 2014-10-20 14:51:24 +02:00
Martin Gräßlin
f545eeb087 Connect pointer events from libinput 2014-10-20 14:51:24 +02:00
Martin Gräßlin
96d6a55ea8 Do not create a WaylandSeat if we use libinput 2014-10-20 14:51:24 +02:00
Martin Gräßlin
15a1a5b70f Add command line option to enable libinput support
kwin_wayland gains a new command line option to enable libinput support.
This is needed as logind blanks the VT when the session controller
releases the control. So a nested compositor can seriously affect the
primary session. Thus it needs a dedicated command line switch to
enable it.

By default libinput support is disabled for kwin_x11 and can be enabled
for kwin_wayland in case KWin is compiled with libinput support.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
6a032e78b7 Suspend/Resume libinput when logind session Active changes
LogindIntegration starts monitoring the Active property on the session
and emits a signal when the state changes. The LibInput::Connection
connects to this signal during the setup and uses it to suspend/resume
the libinput context.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
a918591fef Use Logind to open/close devices needed by libinput
With libinput we have the problem that we need to have privileges to
open the device files. In order to not need wrappers or suid bits, we
use logind. This means that kwin_wayland has to be the session controler.

A LogindIntegration is added to connect to logind and wrap the dbus
calls. This is based on the logind integration done for ksld in
ksmserver. The LogindIntegration is started by Workspace and the
InputRedirection tries to become the session controller and starts the
libinput integration only after this succeeded.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
c4bb3d11fc Initial support for libinput
Libinput is an optional dependency for getting low level input events.
As opening the input devices requires root privs this is rather
pointless in the current state. But there is a small added test app which
can be executed with root privs to demonstrate the functionality. To
properly get input events we need a wrapper like it's used in weston.

So far the following is setup:
* opening devices found by udev
* forwarding keyboard events to InputRedirection
* forwarding pointer button events to InputRedirection
* forwarding pointer axis events to InputRedirection
* signals emitted for pointer motion events

Pointer motion events need some further work as they are provided
as delta events. We need to track that and map them properly.

Also missing are touch events due to me not having a touch screen.
It should be fairly simple to setup the touch events, though.

Also hotplugging of devices is not yet implemented.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
075422fc5e [effects] Add type property to StartupFeedback Effect
Allows to read the configured type in support information.
2014-10-20 14:50:41 +02:00
l10n daemon script
5288363274 SVN_SILENT made messages (.desktop file) 2014-10-17 09:07:36 +00:00
Martin Gräßlin
c2185c9530 Drop check whether WAYLAND_DISPLAY env is set
It was used to check whether we should create the Wayland interaction,
but now that is in kwin_wayland and kwin_x11 doesn't even try to create
the WaylandBackend.
2014-10-17 09:28:15 +02:00
Martin Gräßlin
1829345a2f Support setting cursor image as a SubSurface
The idea is to manage the cursor position by ourself. This is needed
when KWin gains libinput support and doesn't rely on the Seat anymore.
The suggestion for this is to use SubSurfaces. The nice side-effect is
that we can do cursor warping again which we need e.g. for ScreenEdge
activation or for the kill helper, etc. Clients on the other side
still cannot (and should not) warp the pointer.
2014-10-16 16:39:49 +02:00
Martin Gräßlin
2fec4d55fc Move X11CursorTracker from WaylandSeat to WaylandBackend
Allows it to be easily re-used in case we don't have a Seat.
2014-10-15 14:55:31 +02:00
Martin Gräßlin
fd0d966652 X11CursorTracker emits signal when a new cursor image needs to be installed
This means the X11CursorTracker is no longer bound to the WaylandSeat.
Instead the WaylandSeat just connects to the signal emitted by the
X11CursorTracker. This allows to use the X11CursorTracker also in cases
where we don't use a Seat for setting the cursor image.
2014-10-15 14:29:26 +02:00
Martin Gräßlin
752de2d888 Use Registry::interfacesAnnounced signal for WaylandBackend::createSurface
We are interested in going into createSurface exactly once when
everything is ready. This is something we now know due to the new signal
in Registry. So instead of multiple entry points there is just one.
2014-10-15 12:37:20 +02:00
Jonathan Riddell
b23a19e93b Update version number for 5.2 development 5.1.90 2014-10-14 12:34:56 +02:00
Axel Davy
1e38c38c1f Add an env var KWIN_DBUS_SERVICE_SUFFIX to set a different dbus service name
Signed-off-by: Axel Davy <axel.davy@ens.fr>

REVIEW: 120028
2014-10-14 07:56:06 +02:00
l10n daemon script
98b2402688 SVN_SILENT made messages (.desktop file) 2014-10-10 09:32:35 +00:00
Jonathan Riddell
15e41ce842 Update version number for 5.1.0 2014-10-09 11:11:41 +02:00
Montel Laurent
e4b2f14141 Remove excutable attribute 2014-10-07 19:42:28 +02:00
Jeremy Whiting
f8defc4c8f Context menu: Add "Keep Above Others" icon opposite of "Keep Below Others"
REVIEW:120465
2014-10-06 08:22:37 -06:00
l10n daemon script
1f2bb4232b SVN_SILENT made messages (.desktop file) 2014-09-30 10:55:14 +00:00
l10n daemon script
6dcd8f4a01 SVN_SILENT made messages (.desktop file) 2014-09-28 14:28:25 +00:00
Volker Krause
5db2d5a556 Make constants const, saves a few symbols in the .data section. 2014-09-27 20:30:49 +02:00
Martin Gräßlin
1bb1ab44af Add test case for ScreenEdge::check
Behaves similar to the check with enter notify event.
2014-09-27 12:28:54 +02:00