Commit graph

419 commits

Author SHA1 Message Date
Martin Gräßlin
6bdd0e96f6 [kdecoration] Decoration::client returns a QWeakPointer
In aurorae a wrapper property is added.
2014-11-28 16:28:39 +01:00
Martin Gräßlin
0cc86656c9 DecorationButtonType::QuickHelp -> DecorationButtonType::ContextHelp 2014-11-28 11:27:31 +01:00
Martin Gräßlin
211834edcc [kdecoration] ::paint uses QRect instead of QRegion 2014-11-28 10:26:23 +01:00
Martin Gräßlin
b337a0b52e DecorationShadow uses QRect to set element sizes 2014-11-11 17:02:15 +01:00
Martin Gräßlin
1afc355759 DecorationShadow uses QMargins for padding 2014-11-11 15:18:35 +01:00
Martin Gräßlin
99545da109 [aurorae] s/requestMaximize/requestToggleMaximization/g 2014-11-11 13:20:15 +01:00
Martin Gräßlin
0f76516d01 [aurorae] Decoration::titleRect renamed to ::titleBar 2014-11-11 11:55:20 +01:00
Martin Gräßlin
8cf402f185 Decoration::extendedBorders renamed to ::resizeOnlyBorders 2014-11-11 11:33:02 +01:00
Martin Gräßlin
1c90ca9087 [aurorae] Decoration sets borders using QMargins 2014-11-11 10:49:10 +01:00
Martin Gräßlin
cb9cbae36e Decoration::paint takes the repaint region 2014-11-11 09:39:45 +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
a7bcb70980 [kdecoration2] Adjust to DecortionSettings no longer being a singleton 2014-10-29 16:11:20 +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
d96af81f5e Merge branch 'Plasma/5.0'
Conflicts:
	kcmkwin/kwindesktop/desktop.desktop
2014-09-08 10:07:57 +02:00
Martin Gräßlin
edd2899094 [aurorae] Use AlignHCenter instead of AlignCenter for horizontalAlignment
The Text.horizontalAlignment property expects AlignHCenter instead of
AlignCenter. By not using AlignHCenter the centering broke when a window
got maximized.
2014-09-08 10:05:44 +02:00
l10n daemon script
26baff06a4 SVN_SILENT made messages (.desktop file) 2014-09-01 09:18:50 +00:00
l10n daemon script
baf37deacd SVN_SILENT made messages (.desktop file) 2014-09-01 08:42:05 +00:00
Martin Gräßlin
3d3cd72fa2 [aurorae] Drop project from CMakeLists.txt
Left-over from when it used to be a separate project.
2014-08-21 13:24:25 +02:00
l10n daemon script
90bba3ba77 SVN_SILENT made messages (.desktop file) 2014-08-18 09:18:47 +00:00
l10n daemon script
2696112692 SVN_SILENT made messages (.desktop file) 2014-08-18 08:43:59 +00:00
l10n daemon script
36b404057d SVN_SILENT made messages (.desktop file) 2014-08-15 09:08:57 +00:00
Martin Gräßlin
c40bdc1bb2 [aurorae] Use QMutexLocker in AuroraeClient's dtor
It's possible that the rendering thread is still writing to the
buffer and if we destroy the buffer before it's finished KWin is going
to crash. So let's mutex lock the dtor to ensure that the rendering
thread finishes before we tear down the client.

BUG: 336950
2014-07-07 13:49:10 +02:00
Martin Gräßlin
558e357575 [aurorae] Fix MaximizeRestore Button of Aurorae Themes
Seems like porting to new infrastructure was incomplete. The
MaximizeRestore button consists of two buttons on top of each other with
an own mouse area in each and both always visible. This means the restore
button was stealing the mouse events of the maximize button breaking
maximization.

The solution is to have an additional MouseArea which controls the whole
button making the two button types just visualization.
2014-07-07 08:38:41 +02:00
Martin Gräßlin
7c745ef991 [aurorae] Use NativeRendering for decoration title 2014-06-30 14:33:09 +02:00
l10n daemon script
28c7f3c47d SVN_SILENT made messages (.desktop file) 2014-06-29 08:41:34 +00:00
Martin Gräßlin
3a4bba7542 [aurorae] Fix the position passed in the QMouseEvent for processMousePressEvent
The position passed to core didn't take care of padding and that position
passed to decorationPos caused completely broken resize/moving behavior.
E.g. resize was started where it should have been moving, or jumping of
position when starting moving.

REVIEW: 118803
2014-06-23 08:08:36 +02:00
Martin Gräßlin
bc236f3a4d [aurorae] Improve reading the border elements from C++ side
The KWin::Borders element is provided by an extension plugin. The reason
for that is to be able to use it from e.g. the kcm or Plasmate without
needing to compile the code in.

But this results in Aurorae itself not being able to access the element.
The solution is to first load our decoration plugin and afterwards
register the borders element again with the version compiled in from
Aurorae.

With that we can now read all borders and paddings without using
properties. Also we could connect to change signals and have the borders
and padding handling completely stateful. Might be an idea for extending
the decoration library...
2014-06-23 08:08:36 +02:00
Martin Gräßlin
b85984fe8e [aurorae] Recreate decoration on config change
Border size might have changed and because of that we need to recreate
the decoration.
2014-06-23 07:42:18 +02:00
Martin Gräßlin
500ff7f68c [clients/aurorae] Change some connects to new syntax 2014-06-16 11:37:48 +02:00
Martin Gräßlin
d0c83ddbf3 [kcmkwin/deco] Support loading translations for UI loaded configs
Qml based Aurorae themes can provided a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.

First of all a new property is added to the service file for
specifying the translation domain to be used for the config UI. If
such a translation domain is set we extract all string properties of
the loaded UI and pass them through ki18nd.
2014-06-10 15:49:19 +02:00
l10n daemon script
e73f6b2278 SVN_SILENT made messages (.desktop file) 2014-06-10 10:37:36 +00:00
Martin Gräßlin
48c3519390 [aurorae] Reparent main item to the QQuickWindow
This hopefully works around QTBUG-39336.

BUG: 335253
REVIEW: 118416
2014-06-03 09:20:53 +02:00
l10n daemon script
7553c411c2 SVN_SILENT made messages (.desktop file) 2014-05-03 08:32:58 +00:00
l10n daemon script
2f28437e24 SVN_SILENT made messages (.desktop file) 2014-05-02 08:51:14 +00:00
l10n daemon script
2838a9b606 SVN_SILENT made messages (.desktop file) 2014-04-29 10:12:33 +00:00
l10n daemon script
15aa971aab SVN_SILENT made messages (.desktop file) 2014-04-29 04:54:44 +00:00
l10n daemon script
e1f418f4d0 SVN_SILENT made messages (.desktop file) 2014-04-28 09:00:35 +00:00
l10n daemon script
f44575ddbf SVN_SILENT made messages (.desktop file) 2014-04-28 05:16:52 +00:00
l10n daemon script
69c3289c18 SVN_SILENT made messages (.desktop file) 2014-04-27 21:02:43 +00:00
l10n daemon script
e6db000065 SVN_SILENT made messages (.desktop file) 2014-04-04 05:29:27 +00:00
l10n daemon script
eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
David Faure
20bc3ff68b Include ksharedconfig.h (since it will be removed from kpluginfactory.h) 2014-03-29 09:32:06 +01:00
Martin Gräßlin
cdd9c5bcf5 [kwin/aurorae] Have the QMutex in the Factory and not in each Client
This seems to fix the crash which could happen when closing a window. At
least the kwindowsystem unit tests no longer crash KWin (it was very
reliable before).

BUG: 332091
2014-03-27 14:19:04 +01:00
Marco Martin
16253d7fc3 qtextracomponents->kquickcontrolsaddons 2014-03-25 17:13:43 +01:00
Martin Gräßlin
cf45bf43a6 [kwin/aurorae] Remove kde4 support bits from CMakeLists.txt 2014-03-18 10:56:46 +01:00