With the removal of BoxSwitch all effects which want mouse events use the
fullscreen input window. The available functionality is too complex both
in EffectsHandler and in the Effects.
With this change only fullscreen input windows are supported and all
effects share the input window. This means there is at maximum one input
window. This simplifies the code in the Effects as they don't have to
keep track of the window they created any more. In EffectsHandler it
means that only one window needs to be created, destroyed and raised.
Also it means that we can properly react on screen size changes which had
been ignored in the past. Also quite some roundtrips to X are no longer
needed as we do not need to query the window geometry when creating the
input window.
REVIEW: 110156
The usage has always been questionable as the thumbnails are
too small to properly recognize something.
Now BoxSwitch Effect has reach its end of life which would have
required to keep most of the code just for this thumbnail bar.
If required it would be better to integrate the normal QML based
TabBox to be rendered together with an effect.
BUG: 296070
FIXED-IN: 4.11.0
Many headers included KLocale to use i18n and co. But those methods are
defined in KLocalizedString and not in KLocale.
With KF5 klocale.h does no longer include KLocalizedString causing lots
of compile errors.
This method can be used to get the animationTime in case a configuration
class generated through KConfigXT is used. In general the configuration
stores the magic value 0 for a property "duration". This magic value
indicates that a hard-coded default value should be used.
So the common logic to test the stored value for 0 and then either pass
the stored value or the default value to animationTime is encapsulated
in this method in a generic way.
A MyEffect can use it in the following way:
animationTime<MyEffectConfig>(200);
BUG: 310646
FIXED-IN: 4.10
REVIEW: 107460
If the build option is enabled KWIN_HAVE_OPENGL_1 is passed as a compile
flag when build against OpenGL.
This compile flag is meant to replace the KWIN_HAVE_OPENGLES. So far code
has been ifdefed for special behavior of OpenGL ES 2.0 and to remove
fixed functionality calls which are not available in OpenGL ES 2.0.
With this build flag the fixed functionality calls which are only used in
the OpenGL1 Compositor can be removed and keeping the KWIN_HAVE_OPENGLES
for the real differences between OpenGL 2.x and OpenGL ES 2.0.
E.g. a call like glColor4f should be in an
glColor4f(1.0, 1.0, 1.0, 1.0);
while a call like glPolygonMode should be in an
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
Building for OpenGL ES 2.0 of course implies that KWIN_HAVE_OPENGL_1 is
not defined.
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.
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.
The public member variables for opacity, saturation and brightness
are removed in favor for getter and setters. The variables are
moved into a private class. Those are now qreal instead of double.
To make usage inside the effects easier a multiply method is added
which multiplies the current value with passed in factor and returns
the new value in a functional programming style.
This commit is the top-most of a patch series to refactor
ScreenPaintData and WindowPaintData. Other related commits are:
* 0811772
* ebdc7ec
* 2c8dd8d
* 7699726
* 68e0201
* 611cb09
REVIEW: 105141
BUG: 303314
FIXED-IN: 4.10
Additional TabBox Mode which allows to switch between all open
windows of the current selected application. By default Alt+tilde
is used which is on qwerty just one key above tab. For non-qwerty
layouts the shortcut is unfortunately not convenient.
REVIEW: 104730
FEATURE: 299308
FIXED-IN: 4.9.0
Creating an EffectFrame requires I/O which takes on my system
during testing between 10 and 40 msec. Also it needs a little
bit of memory.
This changes moves out the creation of EffectFrames at Effect
load till the Effect actually needs the EffectFrame. E.g. if a
user does not filter in PresentWindows there is no need to ever
create it.
BoxSwitch effect is ignored as it should be dropped for 4.9.
REVIEW: 104815
For the normal TabBox the TabBoxClient's icon method is
adjusted to use the "user-desktop" icon instead of the
window icon.
For the effects a method to set the caption is extended
to also set the icon on the caption frame.
REVIEW: 104444
FlipSwitch can be navigated with up and down keys as well
as left/right and CoverSwitch only with left and right
keys while Alt+Tab is used.
REVIEW: 104438
FEATURE: 178595
FIXED-IN: 4.9.0
Each effect is able to declare itself as currently being active,
that is transforming windows or painting or screen or doing anything
during the current rendered frame.
This change eliminates the hottest path inside KWin identified by
callgrind.
REVIEW: 102449
Reflection in a vertical multiscreen setup are kind of broken without
PaintClipper. But we have to ask ourselfe whether CoverSwitch in a
vertical multi screen setup makes sense and whether it's useful to
have reflections in such a setup.
Horizontal multiscreen setup works fine (also with reflections).
The KWin::TimeLine class was only a small wrapper around QTimeLine
without adding anything to QTimeLine what is not present in QTimeLine.
The initial idea was to make it possible to provide more curve shapes.
This is now obsoleted by Qt shipping more useful curves with QTimeLine.
So let's clean up a little bit and use QTimeLine directly instead of
the small wrapper.
All effects are adjusted to use QTimeLine directly.
EffectsHandlerImpl just forwards the signals from TabBox. In order
to have a valid pointer to the TabBox, the TabBox is now initialized
before compositing in Workspace.
Client and Unmanaged use a signal to notify that they are about to be closed.
The EffectsHandlerImpl is connected to those signals and emits the appropriate
windowClosed signal to which the effects are connected.
The vertex buffer implementation uses the shader manager to decide
whether core painting should be used or not. Shader manager is only
used by shaders using vertex attributes instead of gl_Vertex etc.
CoverSwitch uses new concept of combining a custom fragment shader with the
built-in generic vertex shader. This shader is used to render the reflection
plane on top of the reflected windows.
The fragment shader uses two uniform colors for front and back and interpolates
between them based on the texcoords (which are not used for texture lookup).
The reflection plane vertices could be buffered.
into KWin's global namespace. Morever None already kind of clashes with X's None.
CCMAIL: kde@martin-graesslin.com
svn path=/trunk/KDE/kdebase/workspace/; revision=1170588
This allows an effect to fade between old and new text/icon. As an example it's added to CoverSwitch.
Currently only supported in OpenGL. XRender might be added, but I'm missing an idea for an effect to add it.
Most effects using EffectFrame require OpenGL anyway.
svn path=/trunk/KDE/kdebase/workspace/; revision=1160252
Rendering of the EffectFrame is moved into the scene as Scene::EffectFrame with a concrete implementation in SceneXrender and SceneOpenGL.
A factory method for an EffectFrame is added to the EffectsHandler, which is used by the effects.
Next step: pass the EffectFrame through all effects, so that effects can transform, blur, invert whatever it.
svn path=/trunk/KDE/kdebase/workspace/; revision=1151271
* Models and Delegates for Clients and Desktops
* Horizontal, vertical and tabular layout
* Layout of one item can be configured by an XML definition
* A desktop item can include a client list
* An optional second list view showing only the selected item
* A new KCM "kwintabbox"
* An alternative TabBox with independent settings and keybindings
* Optional Highlight Windows effect integration
* List scrolls instead of removing items
* Scroll wheel support
* Cursor key support
* Middle click on item closes window
BUG: 195745
BUG: 197187
BUG: 201103
FEATURE: 118184
FEATURE: 156723
FEATURE: 177441
FEATURE: 182897
FEATURE: 193882
GUI:
svn path=/trunk/KDE/kdebase/workspace/; revision=1022861
when a client closes, windowClosed is called before it is removed from the list.
So we have to remove it from our list and make sure it isn't used any more.
And just to be sure we reference the window and unref after the effect closes.
The windowList is only changed in tabBoxAdded and tabBoxUpdated.
BUG: 184602
svn path=/trunk/KDE/kdebase/workspace/; revision=1016998