Commit Graph

10 Commits (bfb52b20c9c7edfee7f3c2a74ad6ce41ee599f88)

Author SHA1 Message Date
Martin Gräßlin 0bf9ed5317 [outline] Use QScopedPointer for created QML item
According to the documentation the ownership of a QObject created by
QQmlComponent::create is transferred to the caller.

This fixes a crash on KWin tear down.
2014-05-30 15:54:24 +02:00
Martin Gräßlin 22fe6a2857 [kwin] Provide composited outline as QML instead of hand drawn FrameSvg
In order to get all our UI being written in QML, the Outline for
compositing is ported to QtQuick. It creates a QQmlContext and
QQmlComponent and loads the (currently hardcoded) qml file. The context
gets to properties exported: outline. The outline property allows the qml
to get the geometry it should use. The QQmlEngine is used from Scripting
thus all general scripting properties are exported (e.g. workspace).

The qml script is expected to create a QQuickWindow as it's root item
and style it.

The qml file is stored in a new qml subdirectory. The idea is that each
of the qml types we have gets an own directory there and for each
implementation there should be a further subdirectory.

Thus we have outline/plasma/ with outline being the type and plasma
being the implementation. But at the moment the script location is still
hardcoded.

REVIEW: 116123
2014-03-10 09:16:16 +01:00
Martin Gräßlin 4a28d000cf Move ShortcutDialog to useractions
It's only used from useractions.cpp which means that it's not the best
fit in utils. We can see the problems with it given that it was in an
ifdef and it included quite some headers into everything.

REVIEW: 110189
2013-04-26 08:53:13 +02:00
Martin Gräßlin cd025c7526 Make Outline a KWIN_SINGLETON
Given that Outline is now a QObject hold by Workspace, but not used in
Workspace, it can also be a KWIN_SINGLETON.

REVIEW: 110146
2013-04-25 09:04:02 +02:00
Martin Gräßlin 1a3bc3f60c Split Outline in a composited and non-composited part
The non-composited part handles the showWithX case with the four small
windows. The composited part shows a translucent QWidget with the
FrameSvg as done by the selection effect frame.

Outline connects to the Compositor toggled signal to switch the mode if
compositing gets suspended/resumed. This works fine also in the case that
the switch happens while the outline is shown. To support this Outline
is now a QObject and created with Workspace as a parent.

Given that the Outline handles both cases by itself, the outline effect
is no longer needed and is dropped together with all the hooks into the
effect system.
2013-04-25 09:04:02 +02:00
Martin Gräßlin badc7a2bc4 Remove show outline from TabBox
It's an option doing pretty much the same as the highlight of selected
window option. But it is known to conflict especially with some Plasma
themes.

BUG: 310935
FIXED-IN: 4.11
REVIEW: 110140
2013-04-24 10:02:57 +02:00
Martin Gräßlin 32b6ef42b9 Strip module path from all Qt #include <>
Done with:
fixqt4headers.pl --strip-modules

REVIEW: 109176
2013-03-06 10:26:56 +01:00
Martin Gräßlin 9f85f7f597 Port non-composited Outline to XCB
Use xcb to create and manage the X11 backend of Outline. In addition the
used background pixmaps are rendered with XRender instead of using a
QPainter on a QPixmap. This is done because QPixmap is no longer bound to
an X Pixmap.

To create the XRender Picture the available functionality from
kwinxrenderutils is used. To be able to use it in KWin core the compile
option to build without XRender is removed for kwinxrenderutils, but
still supported for effects.

Obviously the port to XCB is not complete as xremderutils itself is still
on XLib.

REVIEW: 108642
2013-02-04 08:55:21 +01:00
Philipp Knechtges 044ffb3a4b kwin: fix Outline::hide() bug
Unless the mouse pointer is not next to an electric border kwin calls
Outline::hide() on every move/resize event. To avoid unnecessary
repaints we now check whether the outline has been visible or not.
2012-01-31 14:34:04 +01:00
Martin Gräßlin ff3900d825 Refactor KWin Outline code into an own class
This change unduplicates some code and merges it into one class
allowing us to use an replacement effect for the outline in
future.
CCMAIL: a.arlt@stud.uni-heidelberg.de
REVIEW: 100848
2011-04-28 11:19:05 +02:00