Commit graph

9438 commits

Author SHA1 Message Date
Thomas Lübking
976037717b delay unsynced window ready_for_painting state
by at max 50ms (and thus trigger a full repaint with the state change)

BUG: 295254
REVIEW: 106173
FIXED-IN: 4.9.1
2012-08-28 21:08:02 +02:00
Kai Uwe Broulik
ec022261e4 Make Startup Feedback Effect aka Bouncing Cursor respect global size for small icons
BUG: 305611
REVIEW: 106166
FIXED-IN: 4.9.1
2012-08-28 21:06:22 +02:00
Script Kiddy
9fb338ccd5 SVN_SILENT made messages (.desktop file) 2012-08-28 18:59:14 +02:00
Hugo Pereira Da Costa
08e9acae0d Fixed positioning of tabs when manually reordering with right mouse button
Made 'drop target' animation consistent with where tab is actually dropped
Cleanup code.
CCBUG: 305443
2012-08-28 09:26:04 +02:00
Hugo Pereira Da Costa
f28d4ef91a Added Option to enable window close on menu double click.
CCBUG: 305738
2012-08-27 23:00:44 +02:00
Hugo Pereira Da Costa
6efd6bc702 fixed indentation. 2012-08-27 23:00:32 +02:00
Martin Gräßlin
7a1fe42be0 Fix uninitialized memory and logic error in PaintRedirector
The refactoring of Compositor starting with b1739c3 caused some
regressions due to variables in Workspace and Compositor not
being initialized. Furthermore there was a boolean logic error
in PaintRedirector causing the decorations not to paint.

BUG: 305875
2012-08-27 19:45:01 +02:00
Allen Winter
ab1f0bb749 fix testTabBoxConfig linking by adding ${QT_QTCORE_LIBRARY} to the
target_link_libraries.
2012-08-26 18:07:48 -04:00
Martin Gräßlin
d81df32a4f Support for Plastik's configuration options
Adding a KConfigXT xml file and an ui file to configure the QML
variant of Plastik.

Currently supported options:
* title alignment
* title shadow
* animation of buttons

Missing option:
* colored borders
2012-08-26 20:59:37 +02:00
Martin Gräßlin
25ac108a76 Support for custom configuration dialogs for QML decorations
If the decoration package contains a ui file in ui/config.ui and
and KConfigXT xml file in config/main.xml the configure dialog
is extended by the custom values.

For this the ui file is loaded and included in the dialog's
layout. To make this possible the AuroraeConfigForm is changed
to a VBoxLayout containing the so far used FormLayout.

The configuration settings are loaded using Plasma's ConfigLoader
and attached to the widget through a KConfigDialogManager.

Marking this commit as the one which implements QML support for
Aurorae themes:

REVIEW: 105751
REVIEW: 105768
BUG: 303810
FIXED-IN: 4.10
2012-08-26 20:57:56 +02:00
Martin Gräßlin
8de1fea67e Option to disable window close on menu double click in Aurorae
For each theme the setting can be enabled individually with the
default being enabled by default. It is completely handled
inside the MenuButton QML component so each QML theme benefits
from the option automatically, too.

BUG: 301327
FIXED-IN: 4.10
REVIEW: 106160
2012-08-26 20:56:19 +02:00
Martin Gräßlin
8d55d9fa21 Use DecorationOptions in Aurorae themes
Instead of injection the Factory as a context property into the
Aurorae QML file the new DecorationOptions is used.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
459da3ea44 Port of Plastik decoration to QML
The Plastik decoration buttons are provided by a declarative
extension plugin as the canvas drawing API would be needed to
draw these buttons. This should be changed with Qt 5.

But it's also a nice example to show how a QML based decoration
can have an extension in C++.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
ce2b251c9b Support for config values in QML decorations
When the decoration is reset a signal is emitted that the config
might have changed which the decoration can connect to for
reloading its configuration. For this an invokable method is
added to Aurorae allowing to read a config value which just
returns the QVariant.

Proper support for border sizes are added by providing the enum
in DecorationOptions, so that QML themes can use the enum values
to decide which border size to use.

The kcm is adjusted to also support these config mechanisms and
to properly load and save the border sizes for QML based themes.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
13993a6efb Properly reset Aurorae decorations when theme changes
On change of theme recreate all decorations and create a new
declarative engine and component which is basically a re-init
of the Factory.

There are too many differences between themes - especially when
switching between an old SVG based Aurorae and a new QML based
Aurorae theme.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
249173946a Support for QML based decoration in KCM decoration
Model is extended to support QML based Aurorae themes as well
the preview is able to handle it. For this a new qml component
is added which loads the decoration preview.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
673dcd6ad3 Declarative extension plugin for window decorations
The generic QML components from Aurorae are split out into an
own declarative plugin. In addition two new helper classes are
added to this plugin:
* A ColorHelper to map a few function of KColorSheme and making
  it possible to actually work with colors in QML. The need
  emerged from trying to port Plastik to QML which makes strong
  use of color shading.
* A DecorationOptions class which is a wrapper around KWin's
  KDecorationOptions but in a more useable way for QML. The
  various options are provided as properties and the value of
  the properties changes automatically depending on whether the
  decoration is active or inactive.

Aurorae itself is not yet adjusted to these changes, but it
should also be adjusted as some of the options are currently
exported in the factory and the factory is injected into the
Aurorae QML decoration.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
5923086d1f Basic QML theme support in Aurorae
Aurorae can load QML themes from Plasma package structures.
Code not yet tested as there are no packages yet.
2012-08-26 20:56:19 +02:00
Martin Gräßlin
8e5b2ae1aa Pass Compositor to EffectsHandlerImpl
Obsoletes the need to go through the Workspace object to get to
the Compositor.

TODO for future: make the Compositor being the parent object for
the EffectsHandlerImpl.

Closing Review and bug from this commit, which is the top most
of the patch series.

REVIEW: 106060
BUG: 299277
FIXED-IN: 4.10
2012-08-26 20:49:08 +02:00
Martin Gräßlin
62c4d449f5 Use signals'n'slots instead of deep function call into Compositor
For most actions where the compositor needs to perform an action
(e.g. scheduling another repaint) signals were already emitted.
So it's easier to just connect the signals to the Compositor
which in turn makes the code much more readable.

All signals are connected from the Workspace when either the
Compositor gets constructed or a Toplevel gets created.
2012-08-26 20:44:46 +02:00
Martin Gräßlin
0f2e5e61a8 Move reinitializeCompositing and restartKWin into the Compositor
The DBus signal which causes KWin to reinitialize the Compositor
is moved into the Compositor as everything can be handled from
there as well. This comes together with moving the restartKWin
functionality into the Compositor as it is only relevant there.
Restart will only happen if the wrong Qt graphicssystem is used
for the chosen compositing backend.
2012-08-26 20:44:46 +02:00
Martin Gräßlin
df6c423962 Connect the lost CM Ownership directly to finish slot
All the custom slot did was printing a debug statement and
calling finish. We do not need this debug statement. The times
of Compositors not part of Window Managers are over, so it is
extremely unlikely that we lose the ownership without KWin
going down anyway.
2012-08-26 20:43:57 +02:00
Martin Gräßlin
28a5487d4d Drop compositing prefixes from methods and variables in Compositor
Yes everything in the Compositor is related to compositing, no
need to state it everywhere.
2012-08-26 20:43:57 +02:00
Martin Gräßlin
2d954a6bf3 Make the Scene owned by the Compositor
The Scene has always been created and destroyed inside what is
now the split out compositor. Which means it is actually owned
by the Compositor. The static pointer has never been needed
inside KWin core. Access to the Scene is not required for the
Window Manager. The only real usage is in the EffectsHandlerImpl
and in utils.h to provide a convenient way to figure out whether
compositing is currently active (scene != NULL).

The EffectsHandlerImpl gets also created by the Compositor after
the Scene is created and gets deleted just before the Scene gets
deleted. This allows to inject the Scene into the EffectsHandlerImpl
to resolve the static access in this class.

The convenient way to access the compositing() in utils.h had
to go. To provide the same feature the Compositor provides a
hasScene() access which has the same behavior as the old method.
In order to keep the code changes small in Workspace and Toplevel
a new method compositing() is defined which properly resolves
the state. A disadvantage is that this can no longer be inlined
and consists of several method calls and pointer checks.
2012-08-26 20:43:57 +02:00
Martin Gräßlin
523b537962 Use singleton accessor for Workspace in Compositor
Replaces the member variable which is actually not needed as a
pointer to the Workspace can always be retrieved through the
singleton accessor of Workspace.
2012-08-26 20:43:56 +02:00
Arthur Arlt
f3739469a2 Move Workspace's compositing functions to own class Compositor
All Workspace functions which were implemented in the file composite.cpp
were moved to an own class Compositor. The header entries were moved as well.
All functions calls are updated.
2012-08-26 20:43:56 +02:00
Martin Gräßlin
ab6e4a41da Do not discard popup when compositing state changes
Not needed any more as the menu does no longer contains any
compositing related functionality.
2012-08-26 20:38:45 +02:00
Martin Gräßlin
46996d318e Split the User Actions Menu out of Workspace
All methods and variables related to the User Actions Menu
(rmb window deco, Alt+F3) is moved out of the Workspace class
into an own UserActionsMenu class.

The class needs only a very small public interface containing
methods to show the menu for a Client, closing the menu and
discarding the menu. Everything else is actually private to the
implementation which is one of the reasons why it makes sense
to split the functionality out of the Workspace class.

As a result the methods and variables have more sane names and
the variable names are standardized.

REVIEW: 106085
BUG: 305832
FIXED-IN: 4.10
2012-08-26 20:32:31 +02:00
Martin Gräßlin
bb242d82c5 Adding a unit test for TabBoxConfig
Currently only testing the default ctor and assignment operator.

Inspired by bug fixed with commit 4276161.

REVIEW: 106048
2012-08-26 20:22:51 +02:00
Martin Gräßlin
e9c1240460 Merge branch 'KDE/4.9'
Conflicts:
	kwin/tabbox/clientmodel.cpp
2012-08-26 20:17:25 +02:00
Martin Gräßlin
2f18fe002f Start building up of ClientModel with the first Client to include
So far the first Client to be shown in the list (that is the
currently active window) was inserted as the last client into
the list by prepending it to the list.

This meant that if another Client actually blocks the inclusion
of the currently selected Client (e.g. only one window per app)
the currently active Client never got included in this list.

This change ensures that the recently used model switching has
the starting Client as the first Client in the list and also
simplifies the code.

Stacking order switching mode is not adjusted as it seems rather
broken, like the comment already says.

BUG: 304950
FIXED-IN: 4.9.1
REVIEW: 106139
2012-08-26 20:07:52 +02:00
Martin Gräßlin
a4fed7188c Use the first client as entrance to the focus chain if no active window
The recently used mode of TabBox uses the active window as the entrance
into the focus chain. If there is no active window it does not find any
Clients. To solve this issue the ClientModel now uses the first entry
of the focus chain in case there is no active window.

BUG: 305449
FIXED-IN: 4.9.1
REVIEW: 106088
2012-08-26 20:07:52 +02:00
Jammy Zhou
26430f1d60 Whitelist AMD Catalyst for kwin direct rendering
BUG: 301103
FIXED-IN: 4.10
REVIEW: 106050
2012-08-22 20:35:05 +02:00
Martin Gräßlin
39de3f49f7 Merge branch 'KDE/4.9' 2012-08-19 14:14:17 +02:00
Martin Gräßlin
74fe348b96 Reset shader state in TrackMouse effect prior to render it
The Shader might have left-overs from last usage which might
cause the effect to not work properly.

BUG: 304404
FIXED-IN: 4.9.1
Reviewed By: Thomas Lübking
2012-08-19 14:11:10 +02:00
Martin Gräßlin
5042ca2bdc Adding a screen menu to the Client's useraction menu
New "Move To Screen" menu is shown after the "Move To Desktop"
menu if there are multiple screens and the window can be moved
to another screen. Menu contains one radio button for each
screen.

Selecting an entry sends the Client to the selected screen.

BUG: 269207
FIXED-IN: 4.10
REVIEW: 106065
2012-08-18 09:45:30 +02:00
Martin Gräßlin
e8e6345290 Merge branch 'KDE/4.9' 2012-08-17 20:40:21 +02:00
Martin Gräßlin
fb01e4ab8c Ensure that titleHeight is at least height of buttons
Required to properly lay out the title in case of vertical or
bottom alignment.

BUG: 304822
FIXED-IN: 4.9.1
REVIEW: 105937
2012-08-17 20:39:17 +02:00
Martin Gräßlin
90365e27d0 Merge branch 'KDE/4.9'
Conflicts:
	khotkeys/data/kde32b1.khotkeys
	kinfocenter/Modules/opengl/opengl.desktop
	kwin/tabbox/tests/CMakeLists.txt
	plasma/generic/applets/system-monitor/plasma-applet-sm_hdd_activity.desktop
2012-08-17 17:59:49 +02:00
Martin Gräßlin
23f2de009b Effects can provide support information through properties
The supportInformation is extended to also read the properties
on all effects. In addition each effect can be queried just for
itself through D-Bus, e.g.:
qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur

All effects are extended to provide their configured and read
settings through properties. In some cases also important
runtime information is exposed.

REVIEW: 105977
BUG: 305338
FIXED-IN: 4.9.1
2012-08-17 17:49:49 +02:00
Martin Gräßlin
83b9cb6697 Verify QVariant is valid before casting to Client*
If the ClientModel does not contain any Clients, which can
happen if there is no desktop window, accessing the data of a
ModelIndex returns an invalid QVariant. Because of that it
needs to be ensured that the QVariant is valid before trying to
cast it to a Client Pointer.

BUG: 304620
FIXED-IN: 4.9.1
REVIEW: 105935
2012-08-17 17:48:15 +02:00
Martin Gräßlin
e32d1761c3 Properly elide text in large icons TabBox theme
Using the same elide adjustments as in Thumbnails theme.

BUG: 304847
FIXED-IN: 4.9.1
REVIEW: 105959
2012-08-17 17:46:42 +02:00
Martin Gräßlin
85f31b1310 Honor the decoration font in Aurorae
Adding two properties to the AuroraeFactory to read the active
and inactive title font.

BUG: 304791
FIXED-IN: 4.9.1
REVIEW: 105956
2012-08-17 17:45:56 +02:00
Martin Gräßlin
2c23c6e864 Spellchecking
SVN_SILENT
2012-08-16 08:03:07 +02:00
Martin Gräßlin
628fb7f79d Adding missing newlines at end of files
SVN_SILENT
2012-08-16 08:00:32 +02:00
Ghislain MARY
e685e0f6e0 Enable mouse wheel navigation in flipswitch and coverswitch effects
BUG: 244439
FIXED-IN: 4.10
REVIEW: 105040
2012-08-15 20:58:34 +02:00
Script Kiddy
7f61428480 SVN_SILENT made messages (.desktop file) 2012-08-15 10:56:12 +02:00
Jekyll Wu
1f8467df7b Merge remote-tracking branch 'origin/KDE/4.9' 2012-08-14 21:05:58 +08:00
Script Kiddy
f1974ee328 SVN_SILENT made messages (.desktop file) 2012-08-13 18:22:10 +02:00
Script Kiddy
3e920d34ef SVN_SILENT made messages (.desktop file) 2012-08-12 10:22:00 +02:00