Commit Graph

12618 Commits (65fd014fdb6948b10af63591763bdc5248adeac4)

Author SHA1 Message Date
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
l10n daemon script a010bbc6a7 SVN_SILENT made messages (.desktop file) 2014-11-02 21:49:41 +00:00
Martin Gräßlin 4419b3debf Desktop switchers moved to kdeplasma-addons
Last but not least.
2014-10-31 09:34:48 +01:00
Martin Gräßlin 905c1f8f9d [tabbox/qml] Default desktop switcher moved to look and feel package
REVIEW: 120884
2014-10-31 09:12:56 +01:00
Martin Gräßlin e79f0d54f2 [tabbox] Get DesktopSwitcher from look and feel package
Like with WindowSwitcher the configured value might be for the
look and feel package and thus we should first try to locate it
from the look and feel package.
2014-10-31 09:11:23 +01:00
Martin Gräßlin d9dc53e0ed [tabbox] Window Switcher layouts moved to kdeplasma-addons
REVIEW: 120881
2014-10-31 09:10:24 +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 8f1fffb064 Merge branch 'Plasma/5.1' 2014-10-29 11:46:34 +01:00
Johannes Leuschner 9e5f7009b3 Correcting Exec command in kwinscripts.desktop
BUG: 334177
FIXED-IN: 5.1.1
2014-10-29 11:45:57 +01:00
l10n daemon script 45b1af3165 SVN_SILENT made messages (.desktop file) 2014-10-29 08:42:18 +00:00
Martin Gräßlin 6a8d2236eb [tabbox] Sidebar window switcher got moved to plasma-workspace
It's now part of the org.kde.breeze.desktop look and feel package.
2014-10-29 08:29:29 +01:00
Martin Gräßlin ddc1e6de59 [tabbox] Try locating the WindowSwitcher QML through configured lnf package
We assume the configured layout name is a look and feel package. Thus
the Switcher is located at contents/windowswitcher/WindowSwitcher.qml
of that package.

REVIEW: 120849
2014-10-28 16:53:23 +01:00
Martin Gräßlin f750fef8b7 Merge branch 'Plasma/5.1'
Conflicts:
	CMakeLists.txt
	kcmkwin/kwincompositing/kcmkwineffects.desktop
	kcmkwin/kwincompositing/kwincompositing.desktop
	kcmkwin/kwindecoration/kwindecoration.desktop
	kcmkwin/kwindesktop/desktop.desktop
	kcmkwin/kwinoptions/kwinactions.desktop
	kcmkwin/kwinoptions/kwinadvanced.desktop
	kcmkwin/kwinoptions/kwinfocus.desktop
	kcmkwin/kwinoptions/kwinmoving.desktop
	kcmkwin/kwinoptions/kwinoptions.desktop
	kcmkwin/kwinrules/kwinrules.desktop
	kcmkwin/kwinscreenedges/kwinscreenedges.desktop
	kcmkwin/kwintabbox/kwintabbox.desktop
	scripts/enforcedeco/metadata.desktop
2014-10-28 15:03:15 +01:00
Martin Gräßlin 4625d0076c [kcm-effects] Use Loader for the Video Item
Currently just opening the Desktop Effects KCM loads QtMultimedia which
in turn loads gstreamer 0.10. If one opens any other KCM in
systemsettings and changes without applying the change, the window
freezes when the warning dialog gets shown, because the warning message
pulls in Phonon with maybe the Gstreamer backend which uses
gstreamer 1.0. This is bad, bad and breaks everything.

By using a Loader the problem scope gets reduced. It still happens but
only if one actually watches a video. Only opening the KCM doesn't
trigger the problem any more.

REVIEW: 120842
2014-10-28 12:57:19 +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
l10n daemon script dcff2f9e6a SVN_SILENT made messages (.desktop file) 2014-10-25 09:39:36 +00:00
l10n daemon script 2798acbf18 SVN_SILENT made messages (.desktop file) 2014-10-25 08:58:29 +00:00
Frank Osterfeld 3945b59ade Add libepoxy's include directory 2014-10-24 21:58:59 +02: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
l10n daemon script 7d9831d8b4 SVN_SILENT made messages (.desktop file) 2014-10-23 08:55:48 +00:00
Martin Gräßlin 0a6a69b2d0 Improve handling of KWIN_HAVE_EGL in CMakeLists.txt
KWIN_HAVE_EGL was set to EGL_FOUND which doesn't make sense as EGL is
marked as a runtime dependency. Instead a new build option KWIN_BUILD_EGL
is added defaulting to ON. If set to OFF neither the X11 nor the Wayland
EGL backend are built.

CCBUG: 340171
2014-10-21 16:06:58 +02:00
l10n daemon script 87878572de SVN_SILENT made messages (.desktop file) 2014-10-21 11:18:35 +00:00
Martin Gräßlin 706e22a12b Do not find OpenGL or OpenGLES
As we use epoxy we don't need them any more. KWin compiles, links and
runs just fine without ever trying to find OpenGL or OpenGLES.

BUG: 340170
FIXED-IN: 5.2.0
2014-10-21 08:33:51 +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