Commit graph

10302 commits

Author SHA1 Message Date
Script Kiddy
f515789b02 SVN_SILENT made messages (.desktop file) 2013-04-14 08:37:06 +02:00
Script Kiddy
99ceff018a SVN_SILENT made messages (.desktop file) 2013-04-13 10:11:47 +02:00
Martin Gräßlin
d503d9ffb6 Turn TabBox into a proper singleton
There is only one instance hold by Workspace which means it should follow
the common approach with ::self and ::create.

The hasTabBox is completely removed as it's rather useless and the same
as the ifdef around the usages any way.

REVIEW: 109851
2013-04-11 14:18:30 +02:00
Martin Gräßlin
6f113d84d3 Turn Scripting into a proper singleton
There is only one instance hold by Workspace which means it should follow
the common approach with ::self and ::create.

REVIEW: 109850
2013-04-11 14:01:39 +02:00
Martin Gräßlin
bac6edb269 Add Activities::nullUuid() to replace define in client.cpp
REVIEW: 109853
2013-04-11 13:01:53 +02:00
Martin Gräßlin
da85b5fdc7 Split out Activities related code from Workspace
All activities related code moves into new singleton class Activities.
This class gets only included into the build if the build option is
enabled which means there are less ifdefs all over the code and it also
handles better the moc doesn't like ifdef case.

The class holds the list of open and all activites, the current and the
previous activity and the KActivities::Controller. It also emits the
signals for any activities related changes.

Workspace still contains some activities related code. That is the
adjustment on change of current activity. Nevertheless the code looks
much cleaner now and does not contain the confusing naming conflict with
takeActivity() which existed before.

In all the places where Activities got used the code got adjusted and
quite often the ifdef got added with a fallback for the disabled case.
2013-04-11 13:01:36 +02:00
Martin Gräßlin
34d0df3e0a Remove Workspace::updateOnAllActivitiesOfTransients
Method is more or less just a clone of the Virtual Desktop variant and
not needed as toggleClientOnActivity already takes care of transients.
2013-04-11 13:01:36 +02:00
Martin Gräßlin
0cbc79193b Do not use stackingOrder in LanczosFilter to get all EffectWindows
LanczosFilter tries to discard all cached textures in the timer event by
getting the stacking order and iterating over it. But this approach seems
wrong from several aspects.

First of all the xStackingOrder does not include Deleted windows. So if
a cached texture still exists on an EffectWindow for a Deleted it would
not be discarded.

Also the xStackingOrder could result in an update from X because the
stacking order is currently considered dirty.

Last but not least the EffectsHandler::stackingOrder creates a temporary
list of EffectWindows - good for Effects but not necessarily useful
inside KWin core.

Instead the LanczosFilter gets the list of Clients, desktops, unmanaged
and deleted and iterates over them to check whether there is a texture to
discard.

REVIEW: 109954
2013-04-11 12:57:53 +02:00
Martin Gräßlin
504cb6fa4d Do not check compositing type in LanczosFilter
The LanczosFilter is only created by the SceneOpenGL2, so yes it is
OpenGL2 compositing - no need to check each frame.
2013-04-11 12:57:05 +02:00
Martin Gräßlin
caf340a607 Drop MouseClickEffect::supported
It returns true...

REVIEW: 109955
2013-04-11 12:56:07 +02:00
Fredrik Höglund
e4d60089c8 Merge branch 'KDE/4.10'
Conflicts:
	kwin/glxbackend.cpp
2013-04-09 20:12:07 +02:00
Fredrik Höglund
0168f7eacf kwin/glx: Avoid MSAA configs in initDrawableConfigs()
This is the same fix that was applied to initBufferConfigs() in commit
6cf057777555a5d0c834de3a0165a62916cf3b40.

CCBUG: 315089
2013-04-09 20:10:55 +02:00
Thomas Lübking
2935919cd8 TabBox: fix plasma theme workaround (tabbox)
BUG: 315064
FIXED-IN: 4.10.3
REVIEW: 108947
2013-04-09 19:00:41 +02:00
Thomas Lübking
e7050f64a8 fix flickable bounds when filtering
REVIEW: 105027
BUG: 318096
FIXED-IN: 4.10.3
2013-04-09 19:00:41 +02:00
Thomas Lübking
c0eab5b8e9 TabBox: fix plasma theme workaround (tabbox)
BUG: 315064
FIXED-IN: 4.10.3
REVIEW: 108947
2013-04-09 18:56:52 +02:00
Thomas Lübking
85691c519e fix flickable bounds when filtering
REVIEW: 105027
BUG: 318096
FIXED-IN: 4.10.3
2013-04-09 18:56:16 +02:00
Martin Gräßlin
10002e2006 Add "This effect is not a benchmark" to FPS Effect
Underneath the graph the text "This effect is not a benchmark" is
rendered.

REVIEW: 109869
2013-04-09 13:27:08 +02:00
Luca Beltrame
cfd36fb32e Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	plasma/generic/applets/lock_logout/metadata.desktop [scripty]
2013-04-08 20:26:05 +02:00
Àlex Fiestas
8116322f93 Make activities really optional in KWin
KWin is already able to work without activities but there was some code
left in the rules GUI.

REVIEW: 109815
2013-04-08 17:43:57 +02:00
Script Kiddy
8381581c5a SVN_SILENT made messages (.desktop file) 2013-04-08 13:32:53 +02:00
Martin Gräßlin
8fa3f8daa8 Model to provide easy access to KWin's Clients from QML
A new ClientModel is added which provides multiple different views on
KWin's Clients. The model is organized as a tree model supporting the
following levels:
* activities
* virtual desktops
* screens
* none

The levels can be ordered in whatever way one wants. That is the tree
structure can have an ordering of activities then virtual desktops or
the other way around.

In addition the model provides Exclusion flags  to exclude clients of
certain types. E.g. it's possible to exclude all windows which are not on
the current desktop or all windows which are of type dock.

The model gets automatically updated whenever a Client is added/removed
or changes a state in a way that it should be excluded/included.

The ClientModel is not directly exported to QML. Instead there are
specific sub classes for certain common orderings. This solutions is
chosen to workaround some limitations of QML. The initial idea was to
use a property taking a list of the levels, but this doesn't work because
we are not notified when the QDeclarativeListProperty changes.

Currently the following models are provided to QML:
* ClientModel -> no restrictions
* ClientModelByScreen -> ordering by screen
* ClientModelByScreenAndDesktop -> screen, then desktop

These can be used to get all Clients:
ClientModel {
}

Or to get the classic Present Windows on current desktop:
ClientModelByScreen {
    exclusions: ClientModel.OtherDesktopsExclusion | ClientModel.NotAcceptingFocusExclusion | ...
}

Or to get the classic Present Windows on all desktops:
ClientModelByScreen {
    exclusions: ClientModel.NotAcceptingFocusExclusion | ...
}

Or our well known desktop grid:
ClientModelByScreenAndDesktop {
    id: desktopGrid
    exclusions: ClientModel.NotAcceptingFocusExclusion | ...
}

To support filtering as known by the Present Windows effect one can use
a ClientFilterModel, which is a QSortFilterProxyModel filtering on
window caption, role and class:
ClientFilterModel {
    id: filterModel
    clientModel: desktopGrid
    filter: filterItem.text
}

In case it's a tree level obviously QML does not support this correctly.
So we need to use a VisualDataModel:
VisualDataModel {
    id: clientModel
    model: filterModel
    Component.onCompleted: {
        clientModel.rootIndex = modelIndex(0);
        clientModel.rootIndex = modelIndex(0);
        clientModel.delegate = thumbnailDelegate;
    }
}

As we can see, the rootIndex has to be set to the level which contains
the Clients. Also it seems to be important to create the delegate after
the model index has been set. The idea is to have only one ClientModel
and multiple VisualDataModels if multiple views on the data is needed.

The model has been tested with a painful modeltest session. It looks good
so far modulo the listed limitations and that modeltest is not liking
closing Yakuake in the ClientModelByScreenAndDesktop setup, though it
works fine in real world testing.

REVIEW: 109604
2013-04-08 10:30:45 +02:00
Martin Gräßlin
6351472d28 Add a client property to ThumbnailItem
Makes it a little bit easier to use a ThumbnailItem for a Client. E.g.
ThumbnailItem {
    client: model.client
}

instead of mapping the windowIds, which is rather uncomfty.
2013-04-08 10:30:45 +02:00
Martin Gräßlin
15b84c54f8 Support saturation/brightness in ThumbnailItem
Two new properties saturation and brightness are added to the
ThumbnailItem which can be set from QML.

The properties are honoured by the Scene when rendering the thumbnail.
2013-04-08 10:30:45 +02:00
Script Kiddy
e793067ab6 SVN_SILENT made messages (.desktop file) 2013-04-08 09:00:12 +02:00
Thomas Lübking
2e2e13d89e add dummy if no window for tab attach is available
BUG: 306451
FIXED-IN: 4.11
REVIEW: 109782
2013-04-07 14:47:10 +02:00
Thomas Lübking
b3adc6254b snap maximized windows to border
BUG: 317845
REVIEW: 109864
2013-04-07 14:47:10 +02:00
Script Kiddy
40e1d36f5b SVN_SILENT made messages (.desktop file) 2013-04-07 08:20:59 +02:00
Script Kiddy
a502f68f7f SVN_SILENT made messages (.desktop file) 2013-04-06 13:52:59 +02:00
Script Kiddy
a66fb373b7 SVN_SILENT made messages (.desktop file) 2013-04-04 14:47:50 +02:00
Script Kiddy
6fc4e30441 SVN_SILENT made messages (.desktop file) 2013-04-04 09:29:03 +02:00
Martin Gräßlin
6d6b013720 Introduce a proper screen property in Toplevel
Instead of calculating the screen number each time screen() is invoked,
the screen number gets stored in a private member variable and evaluated
whenever either the screen count changes or the Toplevel's geometry
changes. During move/resize the screen property doesn't get updated. The
update is delayed till the end of the move/resize operation.

REVIEW: 109715
2013-04-02 08:21:01 +02:00
Martin Gräßlin
556d71933b Merge branch 'KDE/4.10' 2013-04-02 08:18:40 +02:00
Martin Gräßlin
d12f5de4c0 Adding an activitiesChanged signal to Toplevel
Only emitted from Client.

REVIEW: 109706
BUG: 317366
FIXED-IN: 4.10.3
2013-04-02 08:17:30 +02:00
Alexander Mezin
8741789fd2 Don't redirect/unredirect windows too frequent
REVIEW: 109795
2013-04-02 08:15:57 +02:00
Script Kiddy
ef0c9f3e94 SVN_SILENT made messages (.desktop file) 2013-03-30 09:40:36 +01:00
Yuri Chornoivan
0845494ba9 Fix typo: confgured -> configured 2013-03-29 07:55:02 +02:00
Thomas Lübking
158d060b5f turn "ignore geometry" forcerule into a setrule
and btw. replace legacy "ignoreposition" by "ignoregeometry"

this will allow to use "apply initially" as "force" used to act
(ignore position on placement) and "force" to prevent clients
from reconfiguring themselves (to not break a tabgroup or to just
not be annoying)

BUG: 311720
CCBUG: 252314
REVIEW: 109691
FIXED-IN: 4.11
2013-03-28 20:31:08 +01:00
Thomas Lübking
f00ec6ccd5 block screenswitch if active screen follows mouse
also inform the user about this

BUG: 183410
FIXED-IN: 4.11
REVIEW: 109678
2013-03-28 20:31:07 +01:00
Thomas Lübking
29e5023cfb fix horizontal constrain in checkWorspacePosition
broke with fe51de8592f5777b57733f6e44924229c64cf80b - 2011...

REVIEW: 109680
2013-03-28 20:31:07 +01:00
Thomas Lübking
07dfaf3c03 consider shaded windows in checkWorkspaceGeometry
they act pretty much the same as unshaded windows, so i don't know
what prevented their inclusion

BUG: 268660
FIXED-IN: 4.11
REVIEW: 109679
2013-03-28 20:31:07 +01:00
Thomas Lübking
ee1d6d568d add effect debug interface and dbus export
allows for effect specific debugging details

REVIEW: 107063
2013-03-28 20:31:02 +01:00
Thomas Lübking
77bcadc5b4 export AnimationEffect::set and ::cancel to script
Also harmonize script parsing - any combination of animationarray
and global animation setting that results in a valid animation is
possible using the global settings as default on the array values

REVIEW: 109212
2013-03-28 19:47:30 +01:00
Thomas Lübking
9a3a7c8824 don't release clients reparented somewhere else
this broke re-embedding clients

XReparentWindow causes an unmap of mapped clients, currently leading into releaseClient()
This will (among other) eg. reparent the client to the root and this is (usually?) executed after the original XReparentWindow, so the client does not end up where it's supposed to be.

REVIEW: 109484
2013-03-28 19:47:30 +01:00
Ralf Jung
72db0e5e71 remove GlVSync option (it has no UI anymore)
Based on (revision 2 of) https://git.reviewboard.kde.org/r/109086/ by Thomas Lübking

REVIEW: 109086
2013-03-28 19:05:52 +01:00
Ralf Jung
8b2b48b966 Fix Lanczos filter description
REVIEW: 109750
2013-03-27 09:49:53 +01:00
Ralf Jung
eff856e8ef Re-add code I accidentally removed 2013-03-26 21:49:59 +01:00
Ralf Jung
e4ff1678ef Fix v-sync in the EGL backend
REVIEW: 109452
2013-03-26 21:08:38 +01:00
Ralf Jung
0598e6363b move the "copy pixels" code into its own function (it's used twice) 2013-03-26 21:08:38 +01:00
Yuri Chornoivan
e8806dfe56 Fix typo: stragtegy->strategy 2013-03-25 08:20:07 +02:00
Thomas Lübking
16998db274 Merge branch 'KDE/4.10'
Conflicts:
	kwin/useractions.cpp
2013-03-24 22:29:50 +01:00