Commit graph

9347 commits

Author SHA1 Message Date
Martin Gräßlin
f6a0c6907a Fix compilation of screenshot effect without XRender 2012-05-26 10:24:11 +02:00
Martin Gräßlin
aebc322a74 Fix compilation of snaphelper effect without XRender 2012-05-26 09:31:04 +02:00
Martin Gräßlin
b40f27f54c Fix compilation of magnifier effect without XRender 2012-05-26 09:05:05 +02:00
Martin Gräßlin
961b5d0720 Fix compilation of kcmcompositing without XRender
Element had been removed from ui file with
2916352c0c366338c63a8a4a7bebe4e84a969f58
2012-05-25 18:31:33 +02:00
Martin Gräßlin
a65b86b5ae KConf Update script for KWin 4.9
BUG: 296775
FIXED-IN: 4.9.0
REVIEW: 104984
2012-05-24 19:02:48 +02:00
Casian Andrei
33492358e5 Fix windows like kickoff from disappearing
When trying to launch kickoff (start menu) or the add widgets from
Plasma, they disappeared immediately after appearing, making them
completely unusable.

This regression was traced back to commit
bf0a241c2462072fbc52012784fa51b9b42a1baf.

In Client::setOnActivities, if newActivitiesList was empty, after
joining it and splitting it back, it would contain an empty string, i.e.
it would have a different size than before. This eventually caused the problems.

REVIEW: 105016
2012-05-23 10:50:14 +03:00
Martin Gräßlin
d75e7a6d60 Use smart pointers to protect access to TabBoxClient
Client holds a SharedPointer to the TabBoxClient and only
provides access to a WeakPointer which is passed to TabBox.
ClientModel is adjusted to hold a list of WeakPointers instead
of the direct pointers.

This fixes the following reproducable crash:
1. Configure both primary and secondary TabBox with different
   layouts
2. Use primary TabBox
3. Close a window, best the one which used to be active
4. Use secondary TabBox
-> Crash

The reason is that the ClientModel still contains the pointer
to the deleted TabBoxClient in step 3 and while creating the
layout access to the TabBoxClient is needed to get the Client's
icon.

By using the weak pointer it can be ensured that we don't try
to dereference the deleted pointer and prevent the crash.

CCBUG: 290482
CCBUG: 285747
CCBUG: 237345
REVIEW: 105000
2012-05-22 18:37:41 +02:00
Martin Gräßlin
f24103481e Ensure ScreenTransformation matrix is reset after rendering cube
Cube effect modifies the ScreenTransformation matrix. While each
window resets the matrix on a global level it's not reset. That
means if the last rendered window had the screen rotated the
ScreenTransformation keeps the rotation even after the cube
ended. This causes a rotated window in e.g. TaskbarThumbnails.

REVIEW: 104918
CCBUG: 299869
2012-05-22 18:34:11 +02:00
Martin Gräßlin
1379bbaa83 Use enum based setUniform in cube effect
A little bit more safety when setting a uniform value.

REVIEW: 104923
2012-05-22 18:31:14 +02:00
Martin Gräßlin
88e4ede6ce Window Switching layouts are not flickable over bounds
Flicking has to stop at the bounds in the window switcher
layouts. It's not natural on the desktop that they are
flickable in the first place.

Window Strip is unchanged as this layout is intended to be used
on touch and flickable user experiences.

REVIEW: 105001
2012-05-22 18:29:30 +02:00
Martin Gräßlin
98feb9dd3b Ensure scrollbar does not overshoot decoration list
Stop at bounds while flicking to have a list which behaves in a
natural way on the desktop and ensure that the scrollbar
handles cannot overshoot the list.
2012-05-22 18:29:18 +02:00
Martin Gräßlin
38c1e721dc Set maximum highlight move duration in kcm decoration
Ensures that animation finishes after a reasonable amount of
time and does not follow the default 400 pixels/second.
2012-05-22 18:29:18 +02:00
Martin Gräßlin
26ff05b4bd Export highlight color as context property to decoration list
Ensures that decoration list uses the defined highlight color
instead of hardcoded value.
2012-05-22 18:29:17 +02:00
Script Kiddy
2cbe2226f8 SVN_SILENT made messages (.desktop file) 2012-05-20 12:02:09 +02:00
Martin Gräßlin
4490d51ae8 Initialize themeconfig class members with default values
Static getters for each default value added which are used in
ctor to initialize the class members and in the load for
readEntry's default value.

REVIEW: 104994
2012-05-19 19:46:28 +02:00
Frederik Schwarzer
6cce2d93af String casing fixes.
REVIEW: 104995
2012-05-19 14:40:51 +02:00
Martin Gräßlin
ea8db29c2b Escape HTML tags in window caption in Aurorae and Killer
The unescaped tags are interpreted as HTML by Aurorae decorations
and the KWin killer. Escaping the tags ensures that the text is not
rendered incorrectly.

BUG: 293657
FIXED-IN: 4.9.0
REVIEW: 104989
2012-05-19 11:56:35 +02:00
Thomas Lübking
4643b59b0f updateFocusMousePosition when exiting fullscreen mode
REVIEW: 104985
BUG: 300245
FIXED-IN: 4.9
2012-05-18 19:07:28 +02:00
Script Kiddy
66e3d7daa7 SVN_SILENT made messages (.desktop file) 2012-05-18 10:43:04 +02:00
Thomas Lübking
e2553bd842 add deco API versioning support
REVIEW: 104978
BUG: 299141
FIXED-IN: 4.9
2012-05-17 23:26:43 +02:00
Martin Gräßlin
36932d3f2e Reload scripts after saving in scripts KCM
DBus call to start scripting again. This should adjust the
state of loaded scripts to the saved selection in the
KPluginSelector.

REVIEW: 104876
2012-05-17 21:28:10 +02:00
Martin Gräßlin
04701b3057 Enable all buttons in Scripts KCM
Apply button is required in Systemsettings.
2012-05-17 21:27:59 +02:00
Martin Gräßlin
ea5c84dd35 GHNS support for Window Switcher Layouts
Next to the preview/configure button a GHNS button is included
as a simple button with icon only to not break the layout.

Currently the button is not shown as the category on kde-look
has not yet been created yet.

CCBUG: 297636
REVIEW: 104894
2012-05-17 21:18:29 +02:00
Thomas Lübking
2e7e5d2b41 autodestroy sigleton tabgroups
BUG: 299103
FIXE-IN: 4.9
REVIEW: 104975
2012-05-17 21:10:13 +02:00
Ivan Čukić
174e16a74f Merge branch 'master' of git://anongit.kde.org/kde-workspace 2012-05-17 16:33:55 +02:00
Ivan Čukić
0d60a7049d Adds activity window rules to KWin
- adds the kcm rule option to set the activity - one or all option like
  for virtual desktops
- makes the windows obey the rule
- makes the rule enforced even when the user tries to change the
  window's activity via the alt+f3 menu

REVIEW:104972
2012-05-17 16:32:06 +02:00
Thomas Lübking
070b84b2e3 change verbalized "Tab behind" to "Attach as tab to"
BUG: 300156
FIXED-IN: 4.9
2012-05-17 15:05:49 +02:00
Thomas Lübking
c8927395ab rework kcmtabbox
BUG: 297639
FIXED-IN:4.9
REVIEW: 104525
2012-05-17 11:41:38 +02:00
Thomas Lübking
fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
Martin Gräßlin
ecb94fb98c Get Hot New Stuff support for KWin Scripts
Button currently not yet shown as the category on kde-look is
still missing. This means the code is also completely untested.

REVIEW: 104877
CCBUG: 296774
2012-05-17 11:17:48 +02:00
Script Kiddy
606e40f26b SVN_SILENT made messages (.desktop file) 2012-05-16 10:00:04 +02:00
Thomas Lübking
498a0a6a41 force showTabBox when opening layout through dbus
REVIEW: 104961
2012-05-16 00:12:30 +02:00
Martin Gräßlin
d14cf2da92 Show detailed information why an effect cannot be loaded
Effects can specify their minimum requirements in their
desktop file:
* OpenGL
* OpenGL 2 (GLSL required)
* Shaders (either ARB or OpenGL 2)

The configuration module uses this information in combination
with which backend KWin is currently using. So if e.g. OpenGL
is used and an effect requires OpenGL 2 a detailed error
message can be showed that OpenGL 2 is required.

BUG: 209213
FIXED-IN: 4.9.0
REVIEW: 104847
2012-05-15 18:02:57 +02:00
Martin Gräßlin
c9c4e020e2 Screen Edge bindings for Scripts and Scripted Effects
ScreenEdge is changed to emit a signal whenever a screen edge
got activated without an action or effect taking care of it.

A Script can reserve one to many callbacks for an edge and the
callback get's triggered whenever the signal is emitted. On
deconstruction of the Script the edge is unreserved again.

FEATURE: 299275
FIXED-IN: 4.9.0
REVIEW: 104904
2012-05-15 17:54:31 +02:00
Script Kiddy
7c8aa660d1 SVN_SILENT made messages (.desktop file) 2012-05-15 16:43:40 +02:00
Script Kiddy
16d0a1733a SVN_SILENT made messages (.desktop file) 2012-05-12 12:31:50 +02:00
Script Kiddy
1e1467b18c SVN_SILENT made messages (.desktop file) 2012-05-11 09:44:50 +02:00
Martin Gräßlin
38ab8359d7 Simplify construction of TabBoxClientImpl
cppcheck complained about that piece of code and it was not
really good. A TabBoxClient belongs to exactly one Client which
means the setter should for Client should not be there in the
first place and was only used during construction.

REVIEW: 104909
2012-05-11 08:21:01 +02:00
Martin Gräßlin
895af61e47 Add missing Q_UNUSED
SVN_SILENT
2012-05-10 21:03:35 +02:00
Thomas Lübking
41a39a9928 add clipping support to AnimationEffect
REVIEW: 104898
2012-05-10 19:35:13 +02:00
Thomas Lübking
ee53114054 erase vector instead of clearing it to preserve the pre-allocated memory
CCBUG: 299594
REVIEW: 104897
2012-05-10 19:33:40 +02:00
Thomas Lübking
601243e549 handle m_currentBuildQuadsIterator validation independent form painting pass
issue is that the effect chain may (will) change between two paint passes and buildQuads is called outside the paint pass
(shadows / decos whatever changes) so that the iterator may dangle

BUG: 299582
FIXED-IN: 4.9
REVIEW: 104881
2012-05-10 19:33:23 +02:00
Martin Gräßlin
f3443a6b07 Add CMake variable to rename kwin binaries
A CMake variable is used to specify the name of the binary.
By default this is "kwin" but building for PA changes the
name to "kwinactive". The variable adjusts all names, e.g.
kwinnvidiahack becomes kwinactivenvidiahack.

The remaining usage of kwinrc in core and libs is replaced
by a cmakedefine for the configuration name and all data
installations are moved to the defined name. Dynamic loading
for scripts & co is adjusted for loading based on defined name.

This change allows the side-by-side installation of both kwin
for desktop and kwin for Plasma Desktop without the known
issues like conflicts in config files or missing build options
if kwin desktop is used for Plasma Active.

Likewise the KCMs are not adjusted as they are not intended to
be used for kwinactive.

REVIEW: 104299
BUG: 296084
FIXED-IN: 4.9.0
CCMAIL: active@kde.org
2012-05-10 10:25:15 +02:00
Martin Gräßlin
1f97345e35 Asserts for KWin scripts
Further debugging functionality for KWin scripts. Added assert
methods validate the to be tested parameter and throw a script
error if the value is not valid.

Following methods are available:
* assert(value)
* assertTrue(boolean)
* assertFalse(boolean)
* assertEquals(expected, actual)
* assertNull(nullValue)
* assertNotNull(notNullValue)

All methods take an additional optional parameter which is used
as the error message if provided.

Methods to validate the number of arguments and types of the
parameters are added and throw syntax or type errors.

REVIEW: 104870
2012-05-10 10:00:54 +02:00
Martin Gräßlin
c3fce865ee Unload script on end execution and error
A ScriptEngineAgent is added to monitor the execution of a
script. If it ends it stops the script to free resources.

The same is done in case of an exception, just that in this
case the script takes care of unloading itself.

REVIEW: 104871
2012-05-10 09:58:59 +02:00
Ghislain MARY
c66c78f1d2 Key Bindings for Switching between Windows of current Application
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
2012-05-10 09:53:10 +02:00
Script Kiddy
ee92a35f39 SVN_SILENT made messages (.desktop file) 2012-05-10 09:48:44 +02:00
Script Kiddy
4f05ee3870 SVN_SILENT made messages (.desktop file) 2012-05-07 10:03:01 +02:00
Martin Gräßlin
8dd05b6cb2 Fix error introduced with 0950f4
CCBUG: 299429
2012-05-06 20:27:47 +02:00
Martin Gräßlin
b3a813ffa7 Exclude minimized and windows not on current desktop from fade desktop
BUG: 299429
FIXED-IN: 4.9.0
2012-05-06 19:51:56 +02:00