Commit graph

10313 commits

Author SHA1 Message Date
Thomas Lübking
39499de9cc add AnimationEffect::set() and ::cancel()
This will allow to sue the AnimationEffect class for
(temorarily) persistent changes like required by the
translucency effect

REVIEW: 109211
2013-03-05 19:24:30 +01:00
Thomas Lübking
9aef5b85a0 support a permanent glSwapBuffer
either by
- forcing fullrepaints unconditionally
- turning a repaint to a full one beyond a threshhold
- completing the the backbuffer from the frontbuffer after the paint

BUG: 307965
FIXED-IN: 4.10
REVIEW: 107198
2013-03-05 19:24:30 +01:00
Thomas Lübking
499e34736b check list validity before taking last item
also block for tabboxes *around* stackorder changes

BUG: 315528
2013-03-05 19:24:30 +01:00
Thomas Lübking
ad521412a0 update previews after de/installing a deco
CCBUG: 310613
REVIEW: 109266
FIXED-IN: 4.10.2
2013-03-05 19:22:02 +01:00
Thomas Lübking
c0f3895ba7 Map NULL_UUID activity to ALL activities
REVIEW: 109274
BUG: 314830
FIXED-IN: 4.10.2
2013-03-05 19:22:01 +01:00
Thomas Lübking
1bc2d7d3b7 Only prefer current tabgroup if it's shown
BUG: 315956
FIXED-IN:4.10.2
2013-03-05 19:22:01 +01:00
Script Kiddy
76be01b1f4 SVN_SILENT made messages (.desktop file) 2013-03-05 17:07:15 +01:00
Pino Toscano
c3f9889c83 i18n: typo fix 2013-03-04 10:34:16 +01:00
Martin Gräßlin
4c402e8045 Rewrite of Login effect to JavaScript
Main motivation for this rewrite is the fact that the login effect had
been designed under the assumption that there is only one login splash
window. This assumption does no longer hold with the QML based splash,
which creates a window per screen.

By using a JavaScript based effect, the animation effect is implicityly
used which supports animating multiple windows at the same time in a
better and safer way.

BUG: 313061
FIXED-IN: 4.11
REVIEW: 108403
2013-03-04 10:31:27 +01:00
Martin Gräßlin
898e120be9 Extract messages from scripts and scripting module
Messages in scripts are written to kwin_scripts.pot, messages in
scripting are written to kwin_scripting.pot. The cataloges are loaded in
the configuration interfaces and in main kwin.

REVIEW: 108975
2013-03-04 10:29:25 +01:00
Martin Gräßlin
650c606e95 Provide config interface for scripted effects and KWin scripts
A scripted component providing:
* ui/config.ui
* config/main.xml

can get a config interface by using the following in metadata.desktop:
X-KDE-ServiceTypes=KWin/Effect,KCModule
X-KDE-PluginKeyword=`X-KDE-PluginInfo-Name`
X-KDE-Library=kcm_kwin4_genericscripted
X-KDE-ParentComponents=`X-KDE-PluginInfo-Name`

`X-KDE-PluginInfo-Name` has to be replaced by the actual value. In case
of a KWin Script the X-KDE-ServiceTypes needs to be:
X-KDE-ServiceTypes=KWin/Script,KCModule

The GenericScriptedConfig tries to identify the package from the keyword
and creates a Plasma::ConfigLoader and loads the UI from the packaged UI
file.
2013-03-04 10:29:24 +01:00
Martin Gräßlin
d9d9aad674 Use Plasma::ConfigLoader to read config values in scripted effects
Advantage is that the default value is no longer needed and scripted
effects are anyway supposed to add a kconfigxt file.
2013-03-04 10:29:24 +01:00
Script Kiddy
787c572535 SVN_SILENT made messages (.desktop file) 2013-03-04 08:31:27 +01:00
Luca Beltrame
d911cd35d1 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	kwin/layers.cpp [XLib in 4.10 and XCB in master]
2013-03-03 17:25:48 +01:00
Albert Astals Cid
a9bd8924f8 Compile
CCMAIL: kwin@kde.org
CCMAIL: release-team@kde.org
2013-03-03 15:50:34 +01:00
Michael Jansen
ba99977d98 Don't crash if the focus chain is empty()
CCMAIL: kwin@kde.org
2013-03-02 15:11:22 +01:00
Martin Gräßlin
060451a7ec Remove unused includes in SlideBack Effect 2013-03-01 10:34:38 +01:00
Martin Gräßlin
dfdc6211a2 Merge branch 'KDE/4.10'
Conflicts:
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2013-02-28 16:09:09 +01:00
Martin Gräßlin
fa25f7a3bb Disable Lanczos for IvyBridge with Mesa 9.1
I don't like to do it, but it's better than users getting a bad
performance experience.

The change should be reverted once the issue is identified and fixed.

CCBUG: 313613
REVIEW: 109200
2013-02-28 16:03:53 +01:00
Martin Gräßlin
87b7ae2218 Fix compile error introduced with d6b3f698
I should be more careful when reordering commits in my local branches :-)
2013-02-27 11:55:21 +01:00
Martin Gräßlin
e2cbe329c1 XCB port for kwinglobals.h
displayWidth/Height() are rewritten on top of XCB. rootWindow() and
xTime() return xcb datatype instead of XLib datatype.

Unfortunatelly it's not possible to cache the result for displayWidth and
Height, but getting the default screen is cached and provided in another
method.

REVIEW: 109177
2013-02-27 11:47:55 +01:00
Martin Gräßlin
b99e1c0a6b Reduce usage of QCursor::pos() and ::setPos()
Where possible it is changed to Cursor::pos(), where we cannot use the
Cursor class (e.g. Aurorae) we can at least try to limit the usage to
prevent roundtrips to the X server.

REVIEW: 109178
2013-02-27 11:46:30 +01:00
Luca Beltrame
939fa12707 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	ktouchpadenabler/ktouchpadenabler.desktop
2013-02-25 16:47:13 +01:00
Martin Gräßlin
2547192d95 Fix some errors found by ModelTest 2013-02-25 13:40:11 +01:00
Martin Gräßlin
54b263e7b6 Add icons of selected desktop to Desktop TabBox
To support this feature the DesktopModel is turned into a tree model with
the desktops on the root level and the Client's at the next level.

In the view a VisualDataModel is used which kind of supports a tree model
by setting the root index. A list view is added underneath all the
desktops showing the icons of the windows on the desktop one switches to.

BUG: 306187
FIXED-IN: 4.11
REVIEW: 108445
2013-02-25 13:39:57 +01:00
Martin Gräßlin
c3423b15e7 Add method to EffectsHandler to define the cursor for an input window
Convenience method to replace XDefineCursor used in the effects.

REVIEW: 109039
2013-02-25 13:35:19 +01:00
Martin Gräßlin
be4c76ede1 Port Client::updateCursor to XCB and new Cursor class
The Client::cursor property is changed from QCursor to Qt::CursorShape
and renamed to m_cursor (as all usages are adjusted).

This property is mostly used to define the cursor on e.g. the extended
deco border window. To make this easier a XDefineCursor replacement is
added to xcbutils.h both as a static method and as a member function to
Xcb::Window.
2013-02-25 13:35:15 +01:00
Martin Gräßlin
f12cf0efba Replacement class for QCursor
With Qt5 QCursor does no longer provide ::handle() which was used to
set a cursor on a native XWindow for which we do not have a QWidget.

Also KWin has had for quite some time an optimized version to get the
cursor position without doing XQueryPointer each time ::pos() is called.

These two features are merged into a new class Cursor providing more or
less the same API as QCursor.

In addition the new class provides a facility to perform mouse polling
replacing the implementations in Compositor and ScreenEdges.

For more information about the new class see the documentation for the
new class in cursor.h.
2013-02-25 13:35:14 +01:00
Martin Gräßlin
9655c7b3cb Rewrite KillWindow on top of XCB
The code is rewritten in a way to replace the local event loop with event
filtering done in the normal way through events.cpp. Therefore instead of
creating a KillWindow whenever it's needed, there is one available in
Workspace which will be reused on next invocation.

The responsible events are passed from events.cpp to KillWindow for
processing.

In order to port the keycode to symbol to XCB, KWin now finds
xcb_keysyms and links it.

To get the right cursor KWin now links the XCursor library which is
unfortunatelly an XLib based library, but there seems to be no XCB
replacement.
2013-02-25 13:35:14 +01:00
Martin Gräßlin
b8c6831a1f Port Screenshot effect to XCB
This includes:
* getting cursor image through xcb_xfixes
* using xcb_image_get for reading screen content in xrender case
* using xcb_put_image to upload the generated screenshot into shared xpix

Overall this means that QPixmap as an X Pixmap wrapper is no longer used.
The conversion from xcb_image_t to QImage still needs some code for not
matching byte order. I'm a little bit unsure about adding the code as I
would not be able to test it.

REVIEW: 109076
2013-02-25 13:31:50 +01:00
Martin Gräßlin
3809f58dbb Store multiple shortcuts separated by " - " instead of space
Space is a valid shortcut part. E.g. "Volume Up".

KConfig update script for 4.11 is added to migrate existing and erroneous
rules taking into account that space is a valid key.

BUG: 305434
FIXED-IN: 4.11
REVIEW: 108942
2013-02-25 13:30:17 +01:00
Martin Gräßlin
8a2e7fee56 Accept shortucts not matching regular expression
The regular expression is only matching shortcuts of the kind:
ctrl+(123)

which does not match a normal shortcut like:
ctrl+x

So if multiple shortcuts are specified, one without multiple options
has not been accepted.
2013-02-25 13:30:14 +01:00
Martin Gräßlin
dc649d1dc6 Check global shortcuts in Workspace::shortcutAvailable
One TODO less.
2013-02-25 13:30:14 +01:00
Martin Gräßlin
a3faf455b9 Port Zoom effect to XCB and some small improvements
* use xcb_fixes_foo
* drop QX11Info - we don't need it in the effects
* use QScopedPointer for GLTexture/XRenderPicture
* remove commented code
* use kDebug instead of qDebug

Of course XCursor library is still used as there is no XCB replacement.
What could be considered is adding a getCursor hook into the
EffectsHandler as also the ScreenShot Effect is getting the cursor and
using XCursor doesn't seem future proof to me ;-)

Sorry for putting everything into one commit.

REVIEW: 109083
2013-02-25 10:52:50 +01:00
Script Kiddy
4cb53c8471 SVN_SILENT made messages (.desktop file) 2013-02-24 13:57:51 +01:00
Script Kiddy
6d97690042 SVN_SILENT made messages (.desktop file) 2013-02-24 08:18:21 +01:00
Script Kiddy
83faa5f54b SVN_SILENT made messages (.desktop file) 2013-02-22 18:00:11 +01:00
Hugo Pereira Da Costa
2d9e9d6029 Fixed disabling/enabling decoration animations in non-advance mode
CCBUG: 313795
2013-02-22 17:39:56 +01:00
Martin Gräßlin
8efe111162 Fix compile error with building screenedges disabled 2013-02-22 12:37:12 +01:00
Martin Gräßlin
7e10fe524f Fix warnings and compile errors when building with XRender Compositing disabled
ScreenEdgesEffect failed compiling, mouseclick and zoom are yelling
warnings.

Compiling is tested with XRender enabled, for the disabled test I need to
wait for my Jenkins installation ;-)
2013-02-21 18:21:46 +01:00
Martin Gräßlin
0348a14a7d Port Client's shape handling to XCB
REVIEW: 108772
2013-02-21 18:04:40 +01:00
Martin Gräßlin
4a0a4bc27e Split out handling of focus chain into an own class
The new class FocusChain manages two different kind of focus chains.
First of all there is a most recently used focus chain which is primarily
used for TabBox.

Then there is one focus chain per virtual desktop. These chains are used
to determine which Client needs to be activated when e.g. switching to a
virtual desktop.

The individual chains are implemented as a simple QList of Client* with
the most recently used Client as the last element. That way one can see
it as a LIFO like structure.

The desktop focus chains are internally represented as a hash with the id
of the virtual desktop as the key and a list as described as the value.

FocusChain is a singleton which provides some methods to manipulate the
chains and to get a specific Client for a task (e.g. TabBox).

While splitting out the code some unused code inside TabBox got removed
as well as some activities related code (windows cannot be moved while
switching activities).

REVIEW: 107494
2013-02-21 09:57:46 +01:00
Martin Gräßlin
840b952096 Merge branch 'KDE/4.10' 2013-02-20 13:03:29 +01:00
Martin Gräßlin
34bb1a790f Fix layout issues of Desktop Change OSD
* no more binding loops - yeah for anchoring
* properly update sizes when switching screens
* properly handle case layout indicator enabled/disabled
* connect to desktop changed and reset desktop model
* set a maximum width/height of 0.8 of screen

Most interesting change is the moving of
visible = true;
to the beginning of the block which updates the layout. Without that
all the changes are ignored resulting in the incorrect size on screen
change.

The disadvantage of that is that the OSD is shown before the layout is
adjusted. But it's considerable minor given that it should be just one
frame.

BUG: 312728
BUG: 312727
BUG: 305737
FIXED-IN: 4.10.1
REVIEW: 108945
2013-02-20 13:01:43 +01:00
Martin Gräßlin
f7de24fbb6 Merge branch 'KDE/4.10' 2013-02-20 08:07:30 +01:00
Martin Gräßlin
b8dcc04373 Do not abort EGL backend creation if EGL_NV_post_sub_buffer isn't supported
In case the extension is not present eglQuerySurface returns EGL_FALSE
when querying for EGL_POST_SUB_BUFFER_SUPPORTED_NV and sets an
EGL_BAD_ATTRIBUTE error state. If this is the case it's not an error we
should abort on, but one we should ignore as it's the same as extension
not supported.

BUG: 315114
FIXED: 4.10.1
2013-02-20 08:03:02 +01:00
Thomas Lübking
40649cd1e0 Merge branch 'KDE/4.10' 2013-02-18 22:46:59 +01:00
Thomas Lübking
7255352e62 fix restacking ... code
- don't cast Window's to pointers for no apparent reason
  bug introduced with ac0f8bfb24403168199027a77bba0107bc6d42e1
- no stupid java style iterators, we've stl everywhere
- postfix in a for loop is a bug. period. ;-)

BUG: 313145
FIXED-IN: 4.10.1
2013-02-18 22:18:02 +01:00
Thomas Lübking
769955dfb8 ignore non current tabbed and on different activities clients
BUG: 313379
REVIEW: 108932
FIXED-IN: 4.11
2013-02-18 21:55:14 +01:00
Thomas Lübking
694d1a83b3 Permit maximization of windows with fixed position
A window can be "maximized" despite it's position is fixed.
Most obvioulsy for a corresponding of "0", but also in other
cases. The window can still be resized, some size is the
maximum one and there's no reason to prevent the shortcut of
this state.

BUG: 314392
REVIEW: 108789
FIXED-IN: 4.11
2013-02-18 21:55:14 +01:00