Commit Graph

9548 Commits (fe062f6ebbf9ec07d96b61d06cd8f78e393921f3)

Author SHA1 Message Date
Martin Gräßlin fe062f6ebb Introduce ui-file in moving tab of KWin's configuration
Thanks to Alexander Jones for creating the ui file.
2012-10-04 17:26:34 +02:00
Martin Gräßlin 7c2a0f2188 Introduce ui-file for inactive window mouse actions in KWin configuration
Thanks to Alexander Jones for creating the ui file.
2012-10-04 17:26:34 +02:00
Martin Gräßlin 142fa54b2b Introduce ui-file for titlebar mouse actions in KWin's configuration
Thanks to Alexander Jones for creating the ui file.
2012-10-04 17:26:34 +02:00
Martin Gräßlin 847e0f2f9a Introduce an ui-file for Focus configuration
Thanks to Alexander Jones for creating the ui file.
2012-10-04 17:26:34 +02:00
Martin Gräßlin 476adac337 Do not resolve glx functions specified in GLX 1.3
According to the OpenGL ABI for Linux GLX 1.3 is a minimum requirement.
Therefore we do not need to resolve the symbols which are present in that
version.

KWin did always require at least 1.3, for all the resolved functions
there were checks in the Scene, but they might have been incorrect.
Instead now the GLX version is checked and OpenGL compositing is blocked
if there is not at least GLX 1.3.

REVIEW: 106704
2012-10-04 17:17:51 +02:00
Martin Gräßlin 15d714d82c Do not resolve glBlendColor
glBlendColor has been added to OpenGL 1.2 which means it is part of
the OpenGL ABI defined for Linux.

See http://www.opengl.org/registry/ABI/ section 3.4.
2012-10-04 17:17:45 +02:00
Martin Gräßlin cf35c26396 Rework the resolving of OpenGL function pointers
The macro GL_RESOLVE_WITH_EXT was fundamentally broken as it tried to
resolve a symbol first by it's name and then by the extension name if
the returned pointer is null.

From GLX spec:
"A non-NULL return value for glXGetProcAddress does not guarantee that an
extension function is actually supported at runtime. The client must also query
glGetString(GL EXTENSIONS) or glXQueryExtensionsString to determine if an
extension is supported by a particular context."

This macro is now reworked to be used only in case the symbol name does
not match our function name. E.g. glUniform1f vs glUniform1fARB.

The resolving itself also had quite some issues as:
* in same cases function pointers are not nulled
* in same cases only the arb or only the ext is checked
* in same cases the wrong extension is checked

This is now reworked to always check first the ARB extension if available
then the EXT extension and if both are not available the pointers are set
to NULL.
2012-10-04 17:17:45 +02:00
Martin Gräßlin a401558a43 Provide OpenGL over Egl
The Egl backend is decoupled from the OpenGL ES build option which makes
it possible to use it as a replacement for glx.

To make this possible a new build flag is added when egl is available at
compile time and any egl specific code is now ifdefed with this flag
instead of the gles flag. In addition at runtime a windowing system enum
value is passed to the various detect methods to have egl/glx specific
detection for e.g. function pointer resolving.

By default egl is used if compiled with OpenGL ES, otherwise glx is used.
But in the non-gles case the windowing system can be selected through the
new environment variable KWIN_OPENGL_INTERFACE. Setting this variable to
"egl" the EglOnXBackend is used.

REVIEW: 106632
2012-10-04 17:17:01 +02:00
Martin Gräßlin 49cce8dede Build option to disable the Oxygen window decoration
This build option is added to make it easier to build just KWin without
kde-workspace. This is a common requirement by developers wanting to
contribute to KWin and only want to build KWin but use everything else
from their normal distribution.

Building KWin standalone is very often difficult due to Oxygen. If the
library has changed it is not possible to build just KWin without also
building the workspace libs and if you do so you run into ABI problems
when trying to start KWin - either the decoration or the style is
crashing due to not matching libraries.

To circumvent this common issue for new developers this build option
is introduced to just exclude the Oxygen window decoration and defaulting
to Plastik.

Of course by default this option is turned ON, so that the Oxygen
decoration gets build. By default there is no change at all.

REVIEW: 106303
2012-10-04 17:09:39 +02:00
Script Kiddy 5cd15e8920 SVN_SILENT made messages (.desktop file) 2012-10-01 10:36:58 +02:00
Thomas Lübking 87bd9958cf fix zoom factor scale, remains double
BUG: 307609
2012-09-30 13:51:42 +02:00
Martin Gräßlin c2a4f81927 Introduce a helper class to automatically push/pop Shaders
The ShaderBinder class can be used for the case that a block of code
should be executed with a given Shader being bound. This is useful for
all the cases where there is a if-block for OpenGL2 execution with a
Shader being pushed in the first line to the ShaderManager and popped in
the last line of the block. With the helper this can be simplified to:

ShaderBinder binder(myCustomShader);

or

ShaderBinder binder(ShaderManager::GenericShader);

The ctor of ShaderBinder pushes the given Shader to the stack and once
the helper goes out of scope it will be popped again from the stack.

In addition the helper can take care of OpenGL 1 compositing, that is it
just does nothing. So it can also be used where there is a shared OpenGL1
and OpenGL2 code path where the Shader should only be pushed in OpenGL2.
This basically removes all the checks for the compositing type before
pushing/popping a Shader to the stack.

REVIEW: 106521
2012-09-29 15:33:57 +02:00
Martin Gräßlin f9a2ecbf33 Do not use ShaderManager::isValid to check for OpenGL2 compositing
The main usage of ShaderManager::isValid was to have OpenGL2 specific
code pathes. Now we have an actual OpenGL2Compositing type and we know
that the ShaderManager is valid if we have this compositing type and we
know that it is not valid on OpenGL1Compositing. This gives us a much
better check and allows us to use the isValid method just for where we
want to check whether the shaders compiled successfully.

In addition some effects require OpenGL2, so we do not need to check
again that the ShaderManager is valid. Such usages are removed.
2012-09-29 15:33:57 +02:00
Martin Gräßlin 6d2dfe06e7 Introduce dedicated OpenGL1 and OpenGL2 compositing types
The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.

Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.

The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
2012-09-29 15:33:57 +02:00
Script Kiddy 8c38be18b7 SVN_SILENT made messages (.desktop file) 2012-09-29 11:37:39 +02:00
Thomas Lübking a6e8599917 no non clients in _NET_CLIENT_LIST_STACKING
BUG: 307125
FIXED-IN: 4.9.2
REVIEW: 106526
2012-09-27 22:15:24 +02:00
Thomas Lübking 3b7c1fb69d correctly align tabbing shade mode, including hover
REVIEW: 106258
BUG: 294410
FIXED-IN: 4.9.2
2012-09-27 22:15:23 +02:00
Martin Gräßlin 9f8228bb1c Merge branch 'KDE/4.9' 2012-09-27 15:35:36 +02:00
Martin Gräßlin 049582536a Fix enabled borders and padding for maximized Aurorae decos
In the maximized state the enabled borders were still enabled causing
the actual borders to be still shown. In addition the padding is not
adjusted to be 0. This is done in the C++ part is it does not make any
sense to have shadows being thrown to another screen for a maximized
window.

REVIEW: 106576
BUG: 307365
FIXED-IN: 4.9.2
2012-09-27 15:34:32 +02:00
Script Kiddy 5b5f20581a SVN_SILENT made messages (.desktop file) 2012-09-24 11:20:52 +02:00
Reza Shah 211fdfde4a Merge branch 'KDE/4.9'
Conflicts:
	kcontrol/access/kcmaccess.desktop
	kcontrol/autostart/autostart.desktop
	kcontrol/colors/colors.desktop
	kcontrol/dateandtime/clock.desktop
	kcontrol/desktoppaths/desktoppath.desktop
	kcontrol/fonts/fonts.desktop
	kcontrol/hardware/joystick/joystick.desktop
	kcontrol/keys/keys.desktop
2012-09-23 20:06:44 +09:00
Ni Hui 16ea7617f3 fix build without scripting 2012-09-23 13:26:52 +08:00
Ni Hui 720f9239cc fix build without scripting 2012-09-23 13:23:41 +08:00
Script Kiddy a916d99ada SVN_SILENT made messages (.desktop file) 2012-09-22 17:37:32 +02:00
Rohan Garg 322131d74a Merge branch 'KDE/4.9' 2012-09-20 23:22:58 +05:30
Rohan Garg dba3ae6400 Fix the kwin KCM to read cascaded configs
REVIEW: 106498
2012-09-20 23:22:17 +05:30
Script Kiddy cb86f3e0f5 SVN_SILENT made messages (.desktop file) 2012-09-20 10:06:35 +02:00
Thomas Lübking f42f539102 fix merge fix 2012-09-19 20:49:55 +02:00
Thomas Lübking 850c1e6f0d add screen rule 2012-09-19 20:21:43 +02:00
Thomas Lübking 24cf0e75f3 Merge branch 'KDE/4.9'
Conflicts:
	kwin/scene.cpp
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2012-09-19 20:21:18 +02:00
Michael Hohmuth 371a29096b Do not autoraise a window unless the mouse has been moved.
Fixes unintended autoraises when switching workspaces.

BUG: 306281
FIXED-IN: 4.9.2
2012-09-19 20:16:34 +02:00
Thomas Lübking 42ad299d88 Do not unlist Unmanaged when released onShutdown
BUG: 303244
FIXED-IN: 4.9.2
REVIEW: 106382
2012-09-19 20:16:34 +02:00
Thomas Lübking cb265d96fc Sync script loading, KConfGroup is not thread safe
REVIEW: 106377
BUG: 305361
FIXED-IN: 4.9.2
2012-09-19 20:16:34 +02:00
Thomas Lübking 5d80537b2c Do not add extra padding to Client::visibleRect()
REVIEW: 106376
2012-09-19 20:16:33 +02:00
Thomas Lübking 7775510918 fix desktopgrid window manage on VD amount change
BUG: 289747
FIXED-IN: 4.9.2
REVIEW: 106391
2012-09-19 20:16:33 +02:00
Thomas Lübking 2b0c73bea2 Use expandedGeometry to calc thumbnail geometry
BUG: 301730
REVIEW: 106336
FIXED-IN: 4.9.2
2012-09-19 20:16:33 +02:00
Thomas Lübking 0921af2129 fix ignoring dektop related windows for showing desktop state 2012-09-19 20:16:33 +02:00
Alexander Jones 696ea9f4d3 Use KConfigXT in Magnifier Effect
REVIEW: 106442
2012-09-19 12:05:21 +02:00
Martin Gräßlin 85510b91aa Use KConfigXT in ThumbnailAside effect
Thanks to Andrea Scarpino for providing the patch.

REVIEW: 106436
2012-09-19 10:24:04 +02:00
Martin Gräßlin bd91fb10d7 Use KConfigXT in WindowGeometry
Thanks to Andrea Scarpino for providing the patch.

REVIEW: 106413
2012-09-19 10:17:17 +02:00
Martin Gräßlin 9ac20a382d Use KConfigXT in MagicLamp effect
Thanks to Andrea Scarpino for providing the patch

REVIEW: 106412
2012-09-19 09:29:27 +02:00
Martin Gräßlin 8ad02b5582 Use KConfigXT in Dashboard Effect
Thanks to Andrea Scarpino for providing the patch.

REVIEW: 106390
2012-09-19 09:21:15 +02:00
Martin Gräßlin 914729324c Use KConfigXT in Login Effect
Thanks to Andrea Scarpino for providing the patch.

REVIEW: 106387
2012-09-19 09:01:59 +02:00
Script Kiddy 203a9c1838 SVN_SILENT made messages (.desktop file) 2012-09-19 01:16:25 +02:00
Script Kiddy 31464244e1 SVN_SILENT made messages (.desktop file) 2012-09-18 19:14:07 +02:00
Martin Gräßlin 22dd2ca2c9 Merge branch 'KDE/4.9'
Conflicts:
	plasma/generic/scriptengines/python/plasma_importer.py
2012-09-16 21:34:04 +02:00
Martin Gräßlin 967be8b95a Improve performance of Scene::Window
Replace dynamic_casts to check the type for for Toplevel by isFoo()
calls and use static_casts in such blocks.

Furthermore method shape() returns now a constant reference instead of a
copy of the QRegion.

REVIEW: 106364
2012-09-16 21:31:20 +02:00
Martin Gräßlin 5a6d9400b2 Split SceneOpenGL into a concrete SceneOpenGL1 and SceneOpenGL2
SceneOpenGL turns into an abstract class with two concrete subclasses:
* SceneOpenGL1
* SceneOpenGL2

It provides a factory method which first creates either the GLX or EGL
backend which is passed to a static supported() method in the concrete
sub classes. These method can test whether the backend is sufficient to
be used for the OpenGL version in question. E.g. the OpenGL 2 scene
checks whether the context is direct.

The actual rendering is moved into the subclasses with specific OpenGL 1
and OpenGL 2 code. This should make the code more readable and requires
less checks whether a Shader is bound. This is now known through the
Scene: the OpenGL1 scene will never have a shader bound, the OpenGL2 scene
will always have a shader bound.

To make this more reliable the ShaderManager is extended by a disable
method used by SceneOpenGL1 to ensure that the ShaderManager will never
be used. This also obsoletes the need to read the KWin configuration
whether legacy GL is enabled. The check is moved into the supported
method of the OpenGL2 scene.

REVIEW: 106357
2012-09-16 21:28:11 +02:00
Martin Gräßlin db9368fc26 Merge the code to render Client's and Deleted's decoration in SceneOpenGL
The code was basically copy'n'pasted to handle both Client and Deleted
requiring to cast the Toplevel to both Client and Deleted to test whether
it is one of those.

This is now changed from runtime to compile time polymorphism. A
templated method is used to start the rendering process for the decos.
This on the one hand simplifies the code and on the other does not
require any dynamic casts any more as we use the available check on
Toplevel whether it is a Client or Deleted.
2012-09-16 21:28:06 +02:00
Martin Gräßlin fe440377bb Split SceneOpenGL::Window into specific classes for OpenGL 1 and 2
The Window implementation performed many checks whether the rendering
uses the OpenGL 1 or OpenGL 2 code path and there were quite a few
cludges around to make this work.

So instead of many if-else blocks the specific code has now been moved
into a specific sub class and calls to pure virtual method in the base
class are used to trigger this behavior. Although that adds some overhead
in a rather hot code path it should be better than the many chained
method calls used before to handle OpenGL 1 and 2.

It also makes the code a little bit more readable as all the complete
OpenGL 1 implementation is now in one block ifdefed for OpenGL ES.
2012-09-16 21:28:06 +02:00