Commit Graph

11373 Commits (7360d5b79e7484873b0ab10681c3cdb30b477885)

Author SHA1 Message Date
Martin Gräßlin 7360d5b79e [oxygen] Use KCommonDecoration::palette() to get the QPalette to use
Instead of getting the palette of the widget we access the decoration
to have Oxygen follow the color scheme defined on a window.
2013-11-25 09:44:23 +01:00
Martin Gräßlin 23a510c0b5 [kdecorations] Add a ::palette() to the decoration API
The ::palette() in KDecoration and KCommonDecoration returns the
QPalette the decoration should use for the decorated window. The
call delegates into the bridge and KWin core might provide a special
QPalette for a given Client depending on the _KDE_NET_WM_COLOR_SCHEME
property.
2013-11-25 09:44:23 +01:00
Martin Gräßlin 302271ce97 [kwin] Client supports an X property for color scheme
The X property _KDE_NET_WM_COLOR_SCHEME can be set on a window and
specifies the absolute path to a .color file describing the color
scheme of the managed client.

The Client reads this property and creates a QPalette from it. If
the property is not set or the value is incorrect, the Client uses
KWin's default palette.

The idea behind this property is to allow an application with a
custom color scheme to tell KWin which color scheme the window
decoration should use. So that the window looks as a solid pattern
again.
2013-11-25 09:41:24 +01:00
Martin Gräßlin 1ea1fb4fbd Unit test for WindowQuadList::makeGrid and ::makeRegularGrid 2013-11-25 09:27:31 +01:00
l10n daemon script f9a9ecceb8 SVN_SILENT made messages (.desktop file) 2013-11-25 04:11:42 +00:00
Thomas Lübking 26febda4a0 Merge branch 'KDE/4.11'
Conflicts:
	ksmserver/screenlocker/greeter/greeterapp.cpp
	ksmserver/screenlocker/greeter/greeterapp.h
	ksmserver/screenlocker/greeter/themes/org.kde.passworddialog/contents/ui/main.qml
	kwin/libkwineffects/kwineffects.cpp
	kwin/useractions.cpp
	plasma/desktop/applets/window-list/metadata.desktop
	plasma/desktop/containments/panel/plasma-containment-panel.desktop
	plasma/desktop/toolboxes/plasma-toolbox-paneltoolbox.desktop
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
2013-11-24 15:35:17 +01:00
Thomas Lübking c003baee1e clamp timeline time for highlighted desktop
BUG: 327539
FIXED-IN: 4.11.4
2013-11-24 14:30:20 +01:00
Thomas Lübking 54a4a4547d fix shortcut available check
and bypass idempotent shortcut setting

BUG: 327472
FIXED-IN: 4.11.4
REVIEW: 113807
2013-11-24 14:24:06 +01:00
Thomas Lübking 6e56dcd60a remove false noop breaking branches
BUG: 328007
FIXED-IN: 4.11.4
2013-11-24 14:21:35 +01:00
l10n daemon script 1885a90393 SVN_SILENT made messages (.desktop file) 2013-11-24 06:42:15 +00:00
l10n daemon script 8484628fd0 SVN_SILENT made messages (.desktop file) 2013-11-24 04:09:32 +00:00
Martin Gräßlin 2e3eb5402b Fallback to XRender if scene-graph uses GUI thread for OpenGL rendering
This is a workaround fo QTBUG-34898 and affects the VirtualBox driver
and SandyBridge Mobile. OpenGL compositing is just not possible and
crashes as soon as there is anything rendered with QtQuick. This change
should be reverted once the Qt bug is fixed.

To nevertheless use OpenGL one can as always use the KWIN_COMPOSE env
variable, though this will result in crashes. An alternative is to set
QT_OPENGL_NO_SANITY_CHECK which forces Qt into using the threaded
rendering. At least for Sandybridge this seems to be a workable solution
as it's only causing flickering in fullscreen and KWin doesn't use any
fullscreen QtQuick elements.
2013-11-23 10:54:41 +01:00
Martin Gräßlin b7be3cb621 Better handling for making the compositing OpenGL context current
With QtQuick2 it's possible that the scene graph rendering context either
lives in an own thread or uses the main GUI thread. In the latter case
it's the same thread as our compositing OpenGL context lives in. This
means our basic assumption that between two rendering passes the context
stays current does not hold.

The code already ensured that before we start a rendering pass the
context is made current, but there are many more possible cases. If we
use OpenGL in areas not triggered by the rendering loop but in response
to other events the context needs to be made current. This includes the
loading and unloading of effects (some effects use OpenGL in the static
effect check, in the ctor and dtor), background loading of texture data,
lazy loading after first usage invoked by shortcut, etc. etc.

To properly handle these cases new methods are added to EffectsHandler
to make the compositing OpenGL context current. These calls delegate down
into the scene. On non-OpenGL scenes they are noop, but on OpenGL they go
into the backend and make the context current. In addition they ensure
that Qt doesn't think that it's QOpenGLContext is current by calling
doneCurrent() on the QOpenGLContext::currentContext(). This unfortunately
causes an additional call to makeCurrent with a null context, but there
is no other way to tell Qt - it doesn't notice when a different context
is made current with low level API calls. In the multi-threaded
architecture this doesn't matter as ::currentContext() returns null.

A short evaluation showed that a transition to QOpenGLContext doesn't
seem feasible. Qt only supports either GLX or EGL while KWin supports
both and when entering the transition phase for Wayland, it would become
extremely tricky if our native platform is X11, but we want a Wayland
EGL context. A future solution might be to have a "KWin-QPA plugin" which
uses either xcb or Wayland and hides everything from Qt.

The API documentation is extended to describe when the effects-framework
ensures that an OpenGL context is current. The effects are changed to
make the context current in cases where it's not guaranteed. This has
been done by looking for creation or deletion of GLTextures and Shaders.
If there are other OpenGL usages outside the rendering loop, ctor/dtor
this needs to be changed, too.
2013-11-23 10:54:41 +01:00
l10n daemon script 4abba66bf0 SVN_SILENT made messages (.desktop file) 2013-11-23 06:30:36 +00:00
l10n daemon script 551988ebd4 SVN_SILENT made messages (.desktop file) 2013-11-23 03:52:00 +00:00
Fredrik Höglund 76adeb6a13 kwin: Optimize WindowQuadList::makeGrid()
This is the same optimization that was done in makeRegularGrid()
in 45782d387ab894c682b4ccc220e596c8b72c4167.
2013-11-21 23:38:43 +01:00
Fredrik Höglund 006529d8b2 kwin: Optimize WindowQuadList::makeRegularGrid()
Instead of looping over every quad for every grid cell and checking
for possible intersections, loop over the quads once and compute
the top left corner of the first intersecting grid cell. Then loop over
all the intersecting cells from that point and create the sub quads.

This new algorithm also preserves the order of the quads in the
original list.
2013-11-21 23:37:10 +01:00
Àlex Fiestas 1a1a79ca87 Make everything use org.kde.kded5 for now
NOBODY should use org.kde.kded5 but instead directly the service
register by its own modulem, but for now let's just switch to .kded5
so we can get this running fast.
2013-11-21 11:51:38 +01:00
Casian Andrei b5b7fac056 Fix check for no button pressed in Client::buttonReleaseEvent()
There is a check in Client::buttonReleaseEvent() for the state of the
mouse buttons compared to the button masks for button 1, 2, 3 (X11
button indices).

The check was:
if ((state & (Button1Mask & Button2Mask & Button3Mask)) == 0) { ... }
<=> if (state & 0 == 0) <=> if (true)

This change assumes what the check was supposed to be and fixes the problem. The correct fix was proposed by Thomas.

REVIEW: 113359
2013-11-21 08:25:33 +02:00
Raul Fernandes 697180dda0 Avoids unnecessary searchs for info of the window
We already have the info variable. Why search for it again?
Patch reviewed in https://git.reviewboard.kde.org/r/113872/
2013-11-19 09:49:17 -02:00
Martin Gräßlin 9aca68cef1 [kwin/effects] Do not link Qt::Quick for the config modules
Not used.
2013-11-19 12:20:21 +01:00
Martin Gräßlin 7c2448227a [libkwineffects] Improving linking of kwinglutils library
Only needs:
* Qt5::DBus for the communication with color correction
* Qt5::X11Extras for access to XCB, pulls in needed Qt5::Gui
* XCB component XCB for xcb calls in kwinglobals.h
2013-11-19 12:12:57 +01:00
Eike Hein 2b0147f87d Merge branch 'KDE/4.11' 2013-11-19 00:01:56 +01:00
Martin Gräßlin e1b5716228 [kwin] Adjust to API-changes in NETRootInfo 2013-11-18 13:58:35 +01:00
Martin Gräßlin ce674ed509 [kwin] Window -> xcb_window_t or WId 2013-11-18 13:57:46 +01:00
Martin Gräßlin d6a69aea4f [kwin] NETRootInfo::setDesktopGeometry doesn't expect a desktop argument any more 2013-11-18 13:57:06 +01:00
Martin Gräßlin ba66fd9ef6 [kwin] NETWinInfo2 becomes NETWinInfo
And takes a xcb_connection_t instead of Display. Also our own class
is adjusted to no longer need the connection being passed in.
2013-11-18 13:56:28 +01:00
Martin Gräßlin 4a4ec0decd [kwin] Add XLib includes where still needed
No longer included through netwm.
2013-11-18 13:52:38 +01:00
Martin Gräßlin 20d03d5754 [kcmkwindesktop] Adjust to changes in NETRootInfo 2013-11-18 13:50:18 +01:00
Martin Gräßlin 2c9e21a983 [kwin] Use XCB Atom enum definition instead of XLib's one 2013-11-18 13:48:31 +01:00
l10n daemon script 7e368e1ef3 SVN_SILENT made messages (.desktop file) 2013-11-18 04:14:01 +00:00
l10n daemon script d36319ebbe SVN_SILENT made messages (.desktop file) 2013-11-17 06:36:34 +00:00
l10n daemon script 833d1f85c2 SVN_SILENT made messages (.desktop file) 2013-11-17 04:07:54 +00:00
l10n daemon script 2e9d94d959 SVN_SILENT made messages (.desktop file) 2013-11-16 03:51:10 +00:00
Hugo Pereira Da Costa a4b4d696f1 use QApp->setOverrideCursor when detecting window 2013-11-15 16:54:15 +01:00
Bhushan Shah 78c83642c4 Revert "use ecm_mark_as_test in kwin"
This reverts commit 659ee81a092a7efe0e56544277f9863485a3dec7.

somehow tests are not running on kwin
2013-11-15 13:38:35 +05:30
Aleix Pol 7b110f0671 Improve CMake usage
It's basically a run of the port-cmake.sh script in here, mostly the changes
are the following:
- Using KF5::* targets
- Using the proper macros, following recent developments in frameworks
2013-11-15 13:37:47 +01:00
l10n daemon script 38b62ce928 SVN_SILENT made messages (.desktop file) 2013-11-15 04:26:15 +00:00
Bhushan Shah 3257f55850 use ecm_mark_as_test in kwin
REVIEW: 113861
2013-11-14 15:34:01 +05:30
Martin Gräßlin 719923d410 [kwin/aurorae] Add mutex locker around access to the render buffer
We were facing crashes when the buffer image was being read from and
written to at the same time.
2013-11-14 09:41:52 +01:00
Martin Gräßlin 73e0a6586c [aurorae] Use enum type for Decoration Buttons
Defines the DecorationButton type in DecorationOptions (needs to be
re-defined due to QML limitations) and exports the buttons as a
QList<int> property (again QML limitations).

All QML files are switched from string to the new enum type.
2013-11-14 09:41:52 +01:00
Martin Gräßlin 07294b49f2 [kcmdeco] Use new DecorationButton types for describing the buttons
Rather heavy change to get the kcm to no longer use the string based
definition of the buttons on the left and right.
2013-11-14 09:41:52 +01:00
Martin Gräßlin b73d90cf78 [kdecorations] Introduce an enum for decoration buttons instead of characters
A new enum is introduced which defines all the buttons known to KWin.
The defaultTitleButton methods return a list of DecorationButtons instead
of a string which needs to be parsed by the decoration. The same for the
actual title buttons. The reading/storing of the buttons is unchanged,
that is the same characters are used and mapped to the button types.
2013-11-14 09:41:52 +01:00
Martin Gräßlin 79d36fe4e9 [kdecorations] Drop KCommonDecoration::defaultButtons(Left|Right)
Just forwards to static method in KDecorationOptions, thus any user can
also just use this static method directly.
2013-11-14 09:41:52 +01:00
Martin Gräßlin 529fcf0c46 [aurorae] Drop default title buttons left/right from theme config
Nowhere used inside Aurorae.
2013-11-14 09:41:52 +01:00
Martin Gräßlin 5012f9e83a [oxygen] Drop redefining the default decoration buttons
There is no difference between Oxygen and default KDecoration, so
it's not needed. It's also conceptionally wrong: decorations should
not be able to change the global default.
2013-11-14 09:41:52 +01:00
Martin Gräßlin 47857bb9f3 [oxygen] Use new update mechanism of KDecoration in the Button
This allows to have the button animations working in the preview.

Needs to change the reference to Client to non-const.
2013-11-14 09:41:52 +01:00
Martin Gräßlin f03104ac17 [kcmdeco] Connect PreviewItem to factory's recreateDeco signal 2013-11-14 09:41:52 +01:00
Martin Gräßlin 3ea18be574 [kcmdeco] Move KDecorationPreviewOptions into the Model
We need to have it around and not in the Preview widget to be able
to update the options when the buttons change.
2013-11-14 09:41:52 +01:00
Martin Gräßlin aab6037c4a [kcmdeco] KIcon -> QIcon::fromTheme 2013-11-14 09:41:52 +01:00