Commit graph

11507 commits

Author SHA1 Message Date
Martin Gräßlin
a2c9bdc37d [kwin] Export icon in ClientModel again
Now that we have a proper QIcon it makes sense to pass it to the
views.
2013-12-06 16:26:20 +01:00
Martin Gräßlin
2372e02752 [kwin] Use a QIcon in Client for the icons instead of Pixmaps
Client used to have dedicated methods for different icon sizes instead
of combining all pixmaps into one QIcon. This resulted in various parts
of KWin having different access to the icons:
* effects only got one pixmap of size 32x32
* decorations only got the 16x16 and 32x32 pixmaps combined into a QIcon
* tabbox could request all icon sizes, but only as pixmap

Now all sizes are available in one QIcon allowing to easily access the
best fitting icon in a given UI.
2013-12-06 14:41:23 +01:00
Martin Gräßlin
7aeec8ef89 [kwin] Drop dead code
kwin_get_menu_pix_hack was no longer used anywhere.
2013-12-06 11:21:07 +01:00
Martin Gräßlin
a192734ac9 [kwin] Good bye KDE4Support 2013-12-06 10:33:45 +01:00
Martin Gräßlin
81a7a528bb [kwin] Block global shortcuts without KGlobalSettings
DBus call directly to kglobalacceld and don't wait for a signal to
come back.
2013-12-06 10:28:42 +01:00
Martin Gräßlin
9f6f0dd688 [kwin] Drop reaction on SETTINGS_SHORTCUTS changed
This looks mostly like dead code. The change got only emitted by the
KCMKeyboard on save. In ancient times this seems to have caused to
re-read the global shortcuts. Code got commented out during KDE4 times
and after several code refactors all that was left of it was discarding
the user actions menu.
2013-12-06 10:20:10 +01:00
Martin Gräßlin
09958a6b1c [kwin] Connect to refreshFonts from KDEPlatformTheme
Replaces one usage of KGlobalsettings. It might be a good idea to
move the connect into libkdecoration or into the options as it looks
like there is no need to reconfigure everything just because the fonts
changed.
2013-12-06 10:00:44 +01:00
Martin Gräßlin
e92d02ab61 [kwin] Remove include of kdemacros.h from kwinglobals
Instead we generate an export header for kdeinit_kwin and use it
to declare the KWIN_EXPORT. With this change our libs don't include
any KDE4Support headers any more. One step closer to no KDE4Support.
2013-12-06 08:37:16 +01:00
Martin Gräßlin
bad6b31a1c [kwin] effects no longer need to link KDE4Support 2013-12-06 07:51:30 +01:00
Aleix Pol
f8468b4043 Drop KDE4Support in kde-workspace/kwin
REVIEW: 114316
2013-12-05 20:24:02 +01:00
Martin Gräßlin
f7ff03f30b [kwin] Remove usage of KDE_VERSION_STRING
Replaced by KWIN_VERSION_STRING where useful. Support information
no longer contains the SC version number. We have to see whether
there will be a useful framework based platform information.
2013-12-05 17:20:14 +01:00
Àlex Fiestas
acc0498102 Commented usage of removed KStyle api 2013-12-05 16:09:13 +01:00
Martin Gräßlin
13d1b67f99 [libkdecorations] Do not link to Qt5::X11Extras
No longer needed as the library doesn't include kwinglobals.h any more.
2013-12-05 10:07:23 +01:00
Jacob Logan
199ed87c61 [libkdecorations] Generate an export header
REVIEW: 114247
2013-12-05 10:00:46 +01:00
Martin Gräßlin
a4169ae35f Remove unneeded KDebug include
REVIEW: 114289
2013-12-05 09:40:48 +01:00
Egor Matirov
05c2849fee Added export header through cmake for libkwinglutils
REVIEW: 114265
2013-12-03 14:37:29 +01:00
Martin Gräßlin
81edc75207 [kwin] Add a URL property to the kwineffects 2013-12-03 10:27:20 +01:00
l10n daemon script
5d61c2d942 SVN_SILENT made messages (.desktop file) 2013-12-03 07:11:43 +00:00
Martin Gräßlin
d90be88446 [kwin] Connect the Compositor to a reinit signal
Allows to force a reinit from the config module again.
2013-12-03 07:11:30 +01:00
Martin Gräßlin
f7bc2775d1 Remove kwineffects.h include from kwingltexture.cpp
Nothing from kwineffects.h used in this file.
2013-12-02 08:13:08 +01:00
Martin Gräßlin
416898ecfa Remove kwinglobals.h include where not needed any more
Most headers only included kwinglobals.h just for the KWIN_EXPORT
macro. As that's not used any more, we don't need that include any
more.
2013-12-02 07:56:16 +01:00
Jacob Logan
0c4518cca9 added export header through cmake for kwineffects
REVIEW: 114233
2013-12-02 07:43:26 +01:00
Jacob Logan
ac72e9fb73 Changed debug statements in kwin/effects from qDebug() to qCDebug(KWINEFFECTS)
A new .cpp file is added containing the declaration of the logging
category and compiled into the effects lib.

REVIEW: 114194
2013-11-29 08:47:56 +01:00
l10n daemon script
cae5a4f1e0 SVN_SILENT made messages (.desktop file) 2013-11-29 04:26:30 +00:00
Raul Fernandes
4af303a48a Calculate the intersection only once
The intersection of rects are calculated twice without need.
The function QRectF::intersected() calculate and returns the intersection.
If there are no interesection, the returned QRectF is empty.
If the intersected QRectF is equal to QRectF argument, it contains the QRectF argument.

Reviewed in: https://git.reviewboard.kde.org/r/114036/
2013-11-28 10:19:48 -02:00
l10n daemon script
7cd29623ea SVN_SILENT made messages (.desktop file) 2013-11-28 04:07:32 +00:00
Aleix Pol
c7556d6992 kde4_add_plugin -> add_library(MODULE) 2013-11-27 16:11:14 +01:00
Aleix Pol
94f31606e6 CMake macros porting
kconfig_add_kcfg_files
qt5_add_dbus_adaptor
qt5_generate_dbus_interface
2013-11-27 16:11:14 +01:00
l10n daemon script
51b677e1ab SVN_SILENT made messages (.desktop file) 2013-11-27 06:42:57 +00:00
Eric Newberry
02a42b355b Converted Aurorae to categorized logging. 2013-11-25 15:37:33 +01:00
Martin Gräßlin
29926f3caf [kwin] Drop check for KDE_PLATFORM_PROFILE 2013-11-25 13:59:45 +01:00
Martin Gräßlin
affa7da944 [kcm-kwinrules] Add option for window decoration scheme 2013-11-25 10:21:21 +01:00
Martin Gräßlin
49cf996aa7 [kwin] Window specific rule for decoration color scheme
Adds a new force rule to specify the color scheme to use on the window
decoration. The scheme is stored by the name of the .colors file name.
So for Oxygen.colors the value is Oxygen.

When loaded the scheme is located and the full path to the colors file
is used. This is because the X property also uses the full path.
2013-11-25 09:44:23 +01:00
Martin Gräßlin
1c5e5c8480 [kwin] User Actions Menu follows Client's color scheme
When the menu opens we update the QPalette to the one used by the
Client and thus providing a more common look and feel if the window
specified a custom color scheme.
2013-11-25 09:44:23 +01:00
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