Commit Graph

472 Commits (e463905f04f8136145ab46e679b7560749ef29ae)

Author SHA1 Message Date
Oliver Henshaw bf044bf509 Drop unneeded duplicate addImportPath
Let KDeclarative::setupBindings() add the import paths: it too takes
paths from KGlobal::dirs()->findDirs("module", "imports"); it adds paths
in the correct (reverse) order [1].

[1] See kdelibs 400b9f2e9d10386bb175b6123fe0cdaafeaffe61 for further
details.

REVIEW: 110670
2013-05-28 17:21:48 +01:00
l10n daemon script 3a0999688f SVN_SILENT made messages (.desktop file) 2013-05-24 03:35:07 +00:00
l10n daemon script a3b09b7ac4 SVN_SILENT made messages (.desktop file) 2013-05-22 03:36:01 +00:00
Martin Gräßlin fca3814fd9 Fix build error without screenedges
TabBox missed an ifdef.
2013-05-19 14:12:14 +02:00
Script Kiddy 68ddc5f236 SVN_SILENT made messages (.desktop file) 2013-05-11 10:34:17 +02:00
Script Kiddy 44c8899fee SVN_SILENT made messages (.desktop file) 2013-05-10 11:04:42 +02:00
Script Kiddy 5a32f8e813 SVN_SILENT made messages (.desktop file) 2013-05-06 09:31:10 +02:00
Script Kiddy dfd72523b1 SVN_SILENT made messages (.desktop file) 2013-05-02 09:17:01 +02:00
Script Kiddy 52a831d89f SVN_SILENT made messages (.desktop file) 2013-05-01 13:47:48 +02:00
Script Kiddy ffc0e62f9d SVN_SILENT made messages (.desktop file) 2013-05-01 09:12:42 +02:00
Script Kiddy 0922410d5b SVN_SILENT made messages (.desktop file) 2013-04-30 17:35:40 +02:00
Script Kiddy 8e8a18748d SVN_SILENT made messages (.desktop file) 2013-04-26 08:56:47 +02:00
Martin Gräßlin 4a28d000cf Move ShortcutDialog to useractions
It's only used from useractions.cpp which means that it's not the best
fit in utils. We can see the problems with it given that it was in an
ifdef and it included quite some headers into everything.

REVIEW: 110189
2013-04-26 08:53:13 +02:00
Martin Gräßlin 22ecba3b7d Cleanup of includes in utils.h
* removed unneeded includes
* reordered
* camel case

REVIEW: 110188
2013-04-26 08:50:24 +02:00
Script Kiddy 832f2b5a89 SVN_SILENT made messages (.desktop file) 2013-04-25 09:25:02 +02:00
Martin Gräßlin 2e758ed6a7 Add an elevate() method to Toplevel
Shortcut to set an elevated window without the need to check whether
effects pointer is valid and retrieving EffectWindow etc.

REVIEW: 110147
2013-04-25 09:08:27 +02:00
Martin Gräßlin 5046345da0 New desktop switcher layout showing previews of the desktops
Inspired by the desktop switching mode of the boxswitch effect.

REVIEW: 110037
BUG: 296069
FIXED-IN: 4.11
2013-04-24 11:47:26 +02:00
Martin Gräßlin 0eff8a81c1 Role names for Desktop Tabbox model 2013-04-24 11:47:15 +02:00
Martin Gräßlin 466bef3a6d Adding a DesktopThumbnailItem declarative item
Similar to WindowThumbnailItem for rendering a desktop thumbnail.
Uses the new paintDesktop hook.

FEATURE: 296067
FIXED-IN: 4.11.0
REVIEW: 104441
2013-04-24 11:45:47 +02:00
Martin Gräßlin 8037e6529c Rename ThumbnailItem to WindowThumbnailItem
This is for discrimination from the to be added DesktopThumbnailItem.
The name for QML is unchanged to keep the public API stable.
2013-04-24 11:43:22 +02:00
Martin Gräßlin 7c489e43d9 Plasma Package support for desktop switcher layouts
The existing desktop switcher becomes the first available layout called
"informative". For both variants of desktop switchers a new config key is
introduced to define the desktop switcher layout.

Desktop layouts are installed into a different directory than window
switcher layout and use a different service type.

For the moment it's basically a hidden config option as there are no
further layouts yet.

BUG: 296068
FIXED-IN: 4.11
REVIEW: 110021
2013-04-24 11:33:06 +02:00
Martin Gräßlin badc7a2bc4 Remove show outline from TabBox
It's an option doing pretty much the same as the highlight of selected
window option. But it is known to conflict especially with some Plasma
themes.

BUG: 310935
FIXED-IN: 4.11
REVIEW: 110140
2013-04-24 10:02:57 +02:00
Thomas Lübking 8cf6e39eab general tabbox support for screenedges
REVIEW: 109362
BUG: 316288
FIXED-IN: 4.11
2013-04-16 22:07:07 +02:00
Thomas Lübking c6ff7932c2 Tabbox: ask kwin about compositing
REVIEW: 109983
2013-04-16 22:07:06 +02:00
Martin Gräßlin edb074cbc2 Split out screen handling from Workspace into own class Screens
Following the approaches of other split out functionality Screens is a
singleton class created by Workspace.

The class takes over the responsibility for:
* screenChanged signal delayed by timer
* number of screens
* geometry of given screen
* active screen
* config option for active screen follows mouse

The class contains a small abstraction layer and has a concrete subclass
wrapping around QDesktopWidget, but the idea is to go more low level and
interact with XRandR directly to get more detailed information.

All over KWin the usage from QDesktopWidget is ported over to the new
Screens class.

REVIEW: 109839
2013-04-15 10:25:10 +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 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
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 c0eab5b8e9 TabBox: fix plasma theme workaround (tabbox)
BUG: 315064
FIXED-IN: 4.10.3
REVIEW: 108947
2013-04-09 18:56:52 +02:00
Script Kiddy b769b53cb7 SVN_SILENT made messages (.desktop file) 2013-03-24 13:33:27 +01:00
Script Kiddy 285cdce324 SVN_SILENT made messages (.desktop file) 2013-03-24 08:31:57 +01:00
Martin Gräßlin 98a04893a6 Use mgraesslin@kde.org for my mail address in Copyright and AboutData 2013-03-12 13:17:53 +01:00
Martin Gräßlin 6424a44632 Add some missing includes with Qt5/KF5 2013-03-07 13:59:16 +01:00
Martin Gräßlin 5755a6f21a Include KIcon where needed
Similar to the KGlobal case: no longer included in other includes.
2013-03-07 13:59:16 +01:00
Martin Gräßlin 0ccc060218 Include KGlobal were needed
With KF5 some includes which used to include KGlobal, e.g. KStandardDirs
do no longer include KGlobal. So if we use KGlobal we should include it.
2013-03-07 13:59:15 +01:00
Martin Gräßlin 60c42b7a34 s/KLocale/KLocalizedString/g
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.
2013-03-07 13:59:15 +01:00
Martin Gräßlin 32b6ef42b9 Strip module path from all Qt #include <>
Done with:
fixqt4headers.pl --strip-modules

REVIEW: 109176
2013-03-06 10:26:56 +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 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
Thomas Lübking 48128f268c improve multihead situation
prevents the focus being passed to the other head
manages OpenGLIsUnsafe setting per head

CCBUG: 256242
BUG: 282677
REVIEW: 107853
FIXED-IN: 4.11
2013-02-18 21:55:13 +01:00
Luca Beltrame 2209b4851a Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts [scripty translations]:
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2013-02-15 00:04:53 +01:00
Weng Xuetian ae7474a6c4 fix some typo in tabbox qml
REVIEW: 108809
2013-02-14 15:38:50 -05:00
Weng Xuetian b2ee6769de fix Qt 4.7 warning for KWin tabbox qml
improt Qt 4.7 is depracted by import QtQuick 1.0

REVIEW: 108966
2013-02-14 15:35:32 -05:00
Script Kiddy 3e0c94262c SVN_SILENT made messages (.desktop file) 2013-02-06 12:59:02 +01:00
Script Kiddy dad894d830 SVN_SILENT made messages (.desktop file) 2013-02-06 08:18:00 +01:00
Martin Gräßlin 9f85f7f597 Port non-composited Outline to XCB
Use xcb to create and manage the X11 backend of Outline. In addition the
used background pixmaps are rendered with XRender instead of using a
QPainter on a QPixmap. This is done because QPixmap is no longer bound to
an X Pixmap.

To create the XRender Picture the available functionality from
kwinxrenderutils is used. To be able to use it in KWin core the compile
option to build without XRender is removed for kwinxrenderutils, but
still supported for effects.

Obviously the port to XCB is not complete as xremderutils itself is still
on XLib.

REVIEW: 108642
2013-02-04 08:55:21 +01:00
Marco Martin baf21f6b34 Merge branch 'KDE/4.10'
Conflicts:
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2013-01-31 17:00:02 +01:00
Script Kiddy f193c56957 SVN_SILENT made messages (.desktop file) 2013-01-31 16:31:28 +01:00
Script Kiddy ca2cf4d697 SVN_SILENT made messages (.desktop file) 2013-01-31 12:00:36 +01:00
Script Kiddy 1416c8d62c SVN_SILENT made messages (.desktop file) 2013-01-30 16:27:26 +01:00
Martin Gräßlin 58019b9ce3 Merge branch 'KDE/4.10'
Conflicts:
	kwin/client.cpp
2013-01-30 15:16:56 +01:00
Martin Gräßlin 0c92e1f30c Use translucent/dialogs/background elements where possible
In effects it's obvious that compositing is enabled, so specifying the
translucent element is no problem.

In tabbox a context property "compositing" is injected which decides
whether "translucent" or "opaque" elements should be used. Here the
translucent elements are only used if the Blur effect is available - for
this a new Effect::Feature Blur is introduced and in addition it is
tested whether the theme provides the translucent element.

Also the masking is adjusted to ensure that only the shadow is not
blurred.

Reason for this change is that Plasma theme seems not always to pick up
whether compositing is used when used from inside KWin. It does not cover
the Desktop Change OSD which uses PlasmaCore.Dialog and there we cannot
(yet) inject that we use compositing.

Overall I'm quite unhappy with this patch and I do hope we can fix it in
the proper place in the lifetime of 4.10 and revert this patch.

CCBUG: 311995
REVIEW: 108438
2013-01-30 15:14:54 +01:00
Script Kiddy f3ca3e4c02 SVN_SILENT made messages (.desktop file) 2013-01-28 08:47:50 +01:00
Script Kiddy da9c66760a SVN_SILENT made messages (.desktop file) 2013-01-27 13:02:17 +01:00
Martin Gräßlin 45af15b459 Merge branch 'KDE/4.10' 2013-01-27 12:13:51 +01:00
Martin Gräßlin b5dd9d93c1 Fix typo in Window Switcher "compact"
BUG: 313950
FIXED-IN: 4.10.0
2013-01-27 12:12:20 +01:00
Script Kiddy 2ea65eb18e SVN_SILENT made messages (.desktop file) 2013-01-26 13:21:28 +01:00
Script Kiddy 7d821f3814 SVN_SILENT made messages (.desktop file) 2013-01-26 09:04:17 +01:00
Script Kiddy d9a7b6023d SVN_SILENT made messages (.desktop file) 2013-01-23 13:10:44 +01:00
Script Kiddy 9b508d15e4 SVN_SILENT made messages (.desktop file) 2013-01-23 08:28:11 +01:00
Script Kiddy 382c2a309b SVN_SILENT made messages (.desktop file) 2013-01-22 20:36:49 +01:00
Script Kiddy 7245237062 SVN_SILENT made messages (.desktop file) 2013-01-22 16:17:03 +01:00
Script Kiddy 589ed300d1 SVN_SILENT made messages (.desktop file) 2013-01-17 12:53:52 +01:00
Script Kiddy 8154d50dec SVN_SILENT made messages (.desktop file) 2013-01-17 08:15:16 +01:00
Weng Xuetian d24ed172cb Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-10 03:04:28 -05:00
Weng Xuetian e17303af99 forgot to add new file. 2013-01-10 03:02:39 -05:00
Weng Xuetian 5b7a30aeac use qml and svg to drag shadow in tabbox
due to plasma change, shadow is not included by default, hence kwin
tabbox need to handle shadow by itself, and due to kwin is compositor
and have shadow as effects, it's not a good idea to use X property to
pass shadow from kwin to X and to kwin. This change use the old way to
draw shadow side the tabbox, and partly move the blur region setting to
qml.

REVIEW: 108243
2013-01-10 02:55:08 -05:00
Albert Astals Cid dec63fb987 Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-07 11:04:39 +01:00
Martin Gräßlin 1d959dea64 Move Desktop Chain management from Workspace into own class
Most recently used virtual desktop chain is only used in the context of
TabBox and therefore moved into this namespace. KWin uses one desktop
chain for each activity. This is mapped by having multiple DesktopChains.
In addition there is a DesktopChainManager which contains all those
chains which are identified by a QString.

The manager gets connected to the signals emitted by VirtualDesktopManager
for changes in virtual desktops and to signals related to Activities
emitted by Workspace. This means the manager is rather generic as it does
not depend on any other components.
2013-01-07 09:47:51 +01:00
Martin Gräßlin 334b4bf622 Move handling of Virtual Desktops into a VirtualDesktopManager
The ownership for virtual desktops is moved from Workspace into a new
VirtualDesktopManager. The manager is responsible for providing the count
of virtual desktops and keeping track of the currently used virtual
desktop.

All methods related to moving between desktops are also moved from
Workspace to the new manager, though all methods related to Clients on
Virtual Desktops remain in Workspace for the time being. This is to have
the new manager as independent from KWin core as possible.

An rather important change for the handling of virtual desktops is that
the count and the id of a desktop is now an unsinged integer instead of
an integer. The reason for that is that we cannot have a negative count
of desktops as well as it is not possible to be on a desktop with a
negative identifier.

In that regard it is important to remember that a Client can be on a
desktop with a negative identifier. The special value for a Client being
on all desktops is handled by using -1 as a desktop. For the time being
this is not adjusted but instead of comparing the virtual desktop ids one
should prefer to use the convenient methods like isOnDesktop and
isOnAllDesktops. This would allow in future to internally change the
representation for on all desktops.
2013-01-07 09:47:51 +01:00
Script Kiddy c6d91ac7eb SVN_SILENT made messages (.desktop file) 2013-01-07 08:11:48 +01:00
Weng Xuetian 6fd8db7af9 Merge branch 'KDE/4.10' 2013-01-06 23:25:01 -05:00
Script Kiddy 93c9fd0f32 SVN_SILENT made messages (.desktop file) 2013-01-04 07:44:10 +01:00
Martin Gräßlin 47ddf1384c Fix non-const ref iterator issues reported by Krazy2 checker foreach 2013-01-02 18:35:46 +01:00
Martin Gräßlin 533d57da60 Mark most ctors as explicit as reported by Krazy2 checker 2013-01-02 18:35:46 +01:00
Script Kiddy 12f341712c SVN_SILENT made messages (.desktop file) 2012-12-24 09:05:36 +01:00
Script Kiddy d7316b9fcb SVN_SILENT made messages (.desktop file) 2012-12-23 08:01:50 +01:00
Script Kiddy dc5da9b081 SVN_SILENT made messages (.desktop file) 2012-12-22 08:12:14 +01:00
Script Kiddy ef0cae8dab SVN_SILENT made messages (.desktop file) 2012-12-18 15:28:22 +01:00
Thomas Lübking 3964785830 special tab/backtab handling to align kglobalaccel
BUG: 310476
FIXED-IN: 4.10
REVIEW: 107441
2012-12-14 22:36:39 +01:00
Script Kiddy dda5cbea69 SVN_SILENT made messages (.desktop file) 2012-12-13 07:29:15 +01:00
Script Kiddy a5bec484f6 SVN_SILENT made messages (.desktop file) 2012-12-05 07:19:24 +01:00
Script Kiddy 49a373b681 SVN_SILENT made messages (.desktop file) 2012-12-01 08:03:43 +01:00
Script Kiddy 5fc8da9ad7 SVN_SILENT made messages (.desktop file) 2012-11-30 07:40:50 +01:00
Martin Gräßlin 6f90843365 Escape HTML command in window caption before passing to QML
Escaping is performed in the model instead of the UI as each of the QML
files needed to be fixed and it is likeley that the issue would come up
again. In the model it's hopefully fixed for good.

BUG: 309960
FIXED-IN: 4.9.4
REVIEW: 107431
2012-11-27 20:57:42 +01:00
Script Kiddy e6f0f5bcf7 SVN_SILENT made messages (.desktop file) 2012-11-26 07:08:50 +01:00
Pino Toscano 2032c8d886 add/improve TESTNAME in kde4_add_unit_test()
add or improve prefixes for tests, based on the "module" they belong to
2012-11-16 14:37:01 +01:00
Script Kiddy 17ddc517b7 SVN_SILENT made messages (.desktop file) 2012-10-29 09:53:30 +01:00
Script Kiddy 2141dc821b SVN_SILENT made messages (.desktop file) 2012-10-16 18:43:37 +02:00
Script Kiddy 2d36325197 SVN_SILENT made messages (.desktop file) 2012-10-13 11:13:24 +02:00
Martin Gräßlin 777513a0c8 Merge branch 'KDE/4.9'
Conflicts:
	ksmserver/themes/contour/metadata.desktop
	ksmserver/themes/default/metadata.desktop
	kwin/kcmkwin/kwinscripts/kwinscripts.desktop
	kwin/scripts/videowall/metadata.desktop
	kwin/tabbox/qml/clients/compact/metadata.desktop
	kwin/tabbox/qml/clients/present_windows/metadata.desktop
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/applets/system-monitor/plasma-applet-sm_hdd_activity.desktop
	plasma/generic/runners/nepomuksearch/plasma-runner-nepomuksearch.desktop
	plasma/generic/runners/places/plasma-runner-places.desktop
	plasma/generic/runners/webshortcuts/plasma-runner-webshortcuts.desktop
	powerdevil/kcmodule/activities/powerdevilactivitiesconfig.desktop
	powerdevil/kcmodule/global/powerdevilglobalconfig.desktop
	powerdevil/kcmodule/profiles/powerdevilprofilesconfig.desktop
2012-10-12 07:59:22 +02:00
Script Kiddy fb7bb712fb SVN_SILENT made messages (.desktop file) 2012-10-10 21:24:01 +02:00
Script Kiddy 678f5e27cd SVN_SILENT made messages (.desktop file) 2012-10-10 16:15:38 +02:00
Script Kiddy 49a5582f24 SVN_SILENT made messages (.desktop file) 2012-10-01 15:50:20 +02:00
Script Kiddy 5cd15e8920 SVN_SILENT made messages (.desktop file) 2012-10-01 10:36:58 +02:00
Script Kiddy 5b5f20581a SVN_SILENT made messages (.desktop file) 2012-09-24 11:20:52 +02:00
Reza Shah 211fdfde4a Merge branch 'KDE/4.9'
Conflicts:
	kcontrol/access/kcmaccess.desktop
	kcontrol/autostart/autostart.desktop
	kcontrol/colors/colors.desktop
	kcontrol/dateandtime/clock.desktop
	kcontrol/desktoppaths/desktoppath.desktop
	kcontrol/fonts/fonts.desktop
	kcontrol/hardware/joystick/joystick.desktop
	kcontrol/keys/keys.desktop
2012-09-23 20:06:44 +09:00
Script Kiddy a916d99ada SVN_SILENT made messages (.desktop file) 2012-09-22 17:37:32 +02:00
Script Kiddy cb86f3e0f5 SVN_SILENT made messages (.desktop file) 2012-09-20 10:06:35 +02:00
Script Kiddy 203a9c1838 SVN_SILENT made messages (.desktop file) 2012-09-19 01:16:25 +02:00
Script Kiddy 31464244e1 SVN_SILENT made messages (.desktop file) 2012-09-18 19:14:07 +02:00
Martin Gräßlin 3aee94d798 Merge branch 'KDE/4.9'
Conflicts:
	ksysguard/gui/ksysguard.desktop
	kwin/effects/translucency/translucency.cpp
2012-09-07 07:59:10 +02:00
Martin Gräßlin ed3effa2d3 Ensure that the start Client to build up the ClientModel is in the Focus Chain
If the start Client is not part of the focus chain the call to
nextClientFocusChain() cannot return the Client again. So the loop break
condition is never reached and as the focus chain is not empty the call
always returns a not null Client which means KWin is caught in an endless
loop.

This change checks that the starting Client is in the focus chain and if
not the first Client of the focus chain is used.

BUG: 306260
BUG: 306275
FIXED-IN: 4.9.2
2012-09-05 20:55:07 +02:00
Script Kiddy 62ef8ddcad SVN_SILENT made messages (.desktop file) 2012-09-01 11:00:30 +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 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
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 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
Script Kiddy 3e920d34ef SVN_SILENT made messages (.desktop file) 2012-08-12 10:22:00 +02:00
Thomas Lübking 53534f7966 Merge branch 'KDE/4.9'
Conflicts:
	plasma/generic/applets/batterymonitor/metadata.desktop
	plasma/generic/applets/lock_logout/metadata.desktop
2012-08-11 22:13:59 +02:00
Thomas Lübking 266a9d5218 Fix tabboxconfig copy operator
REVIEW: 105880
FIXED-IN: 4.9.1
2012-08-11 21:41:54 +02:00
Script Kiddy 61d565885a SVN_SILENT made messages (.desktop file) 2012-08-11 12:40:05 +02:00
Script Kiddy 9c40152c03 SVN_SILENT made messages (.desktop file) 2012-08-10 17:29:15 +02:00
Martin Gräßlin 4782325c4a Remove outdated options from TabBoxConfig
Since the QML port the LayoutMode had been hardcoded to vertical
layout making it a completely useless code-path.

MinWidth/Height are nowadays completely controlled by the QML
theme. They were not read anywhere except in the kcm, but there
not even bound to a ui element.

The selectedItemLayoutName is also not used anymore with the
new themes.
2012-08-10 16:57:25 +02:00
Script Kiddy d80113f376 SVN_SILENT made messages (.desktop file) 2012-08-07 18:35:48 +02:00
Script Kiddy c79bf24903 SVN_SILENT made messages (.desktop file) 2012-08-06 09:32:20 +02:00
Andre Woebbeking 9eb1cc43a3 link X11 lib (for gold?) 2012-07-27 22:12:59 +02:00
Raphael Kubo da Costa 7beb3f2ce9 Merge branch 'KDE/4.9'
* KDE/4.9:
  Fix callback race in the session save and shutdown code.
  Update for 4.9.0 release
  SVN_SILENT made messages (.desktop file)
  SVN_SILENT made messages (.desktop file)
  Fix regression in QML shutdown menu. Ampersands should be removed from menu entries' text by default.
  Fix typos in a message that broke string freeze.
  Fix potential parallel build failure.

Conflicts:
	CMakeLists.txt
2012-07-25 14:56:17 -03:00
Script Kiddy 3aba56e778 SVN_SILENT made messages (.desktop file) 2012-07-25 18:00:01 +02:00
Script Kiddy 9db4ae2344 SVN_SILENT made messages (.desktop file) 2012-07-24 19:29:09 +02:00
Andreas Hartmetz 6aac45a356 Add required X11 libraries to target_link_libraries().
Also remove some that are already included with KDE4_KDEUI_LIBS.
2012-07-23 15:17:47 +02:00
Martin Gräßlin bd7958392d Verify pointer is valid when calculating the longest caption
The method was missing a check whether the weak pointers in the
internal list got deleted. This could in very unlikely cases
lead to a crash.

In order to verify that adding the null pointer check fixes the
crash a unit test is added to simulate the situation of a
pointer being deleted. This required to add a mock a few
classes of TabBox. A MockTabBoxHandler and MockTabBoxClient are
added implementing the specific interfaces. The DeclarativeView
is completely mocked to make the linker happy. Including the
actual implementation is not possible as it pulls in half of
KWin core.

BUG: 303840
FIXED-IN: 4.9.0
REVIEW: 105645
2012-07-22 19:23:36 +02:00
Script Kiddy b909bdc5c4 SVN_SILENT made messages (.desktop file) 2012-07-21 11:43:56 +02:00
Script Kiddy 88710b0f60 SVN_SILENT made messages (.desktop file) 2012-07-19 10:14:19 +02:00
Script Kiddy 6c572929d8 SVN_SILENT made messages (.desktop file) 2012-07-18 10:04:35 +02:00
Script Kiddy a0b9107edb SVN_SILENT made messages (.desktop file) 2012-07-17 17:16:25 +02:00
Script Kiddy d79989b162 SVN_SILENT made messages (.desktop file) 2012-07-16 11:12:26 +02:00
Script Kiddy 825a9c4f6e SVN_SILENT made messages (.desktop file) 2012-07-09 11:17:38 +02:00
Script Kiddy 11788e8b6f SVN_SILENT made messages (.desktop file) 2012-07-06 10:16:34 +02:00
Script Kiddy 836c2b41b3 SVN_SILENT made messages (.desktop file) 2012-06-20 11:19:37 +02:00
Script Kiddy 50dea703ca SVN_SILENT made messages (.desktop file) 2012-06-19 17:46:37 +02:00
Script Kiddy f305f0eee4 SVN_SILENT made messages (.desktop file) 2012-06-18 10:12:23 +02:00
Script Kiddy 73c4b48c18 SVN_SILENT made messages (.desktop file) 2012-06-17 11:39:36 +02:00
Script Kiddy c1f8590216 SVN_SILENT made messages (.desktop file) 2012-06-15 12:12:07 +02:00
Script Kiddy 953d088b6a SVN_SILENT made messages (.desktop file) 2012-06-12 17:07:51 +02:00
Script Kiddy b4ff83ad3b SVN_SILENT made messages (.desktop file) 2012-06-03 09:41:45 +02:00
Script Kiddy e999536c83 SVN_SILENT made messages (.desktop file) 2012-05-29 17:01:37 +02:00
Script Kiddy 62211420c7 SVN_SILENT made messages (.desktop file) 2012-05-28 11:08:19 +02: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 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
Script Kiddy 2cbe2226f8 SVN_SILENT made messages (.desktop file) 2012-05-20 12:02:09 +02:00
Thomas Lübking 498a0a6a41 force showTabBox when opening layout through dbus
REVIEW: 104961
2012-05-16 00:12:30 +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 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
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
Martin Gräßlin 7f654ee959 Add layout name to D-Bus interface to open TabBox
If the layout name is specified a custom layout config is
passed to the TabBoxHandler with the configured name.

This can be used by Plasma Active to specify the window strip
(overwrites any settings) and for Netbook shell as a replacement
to opening Present Windows Effect.

REVIEW: 104838
2012-05-06 12:58:43 +02:00
Thomas Lübking ed2fabf527 elevate tabbox when elevating highlighted windows
BUG: 299324
FIXED-IN: 4.9
REVIEW: 104845
2012-05-04 19:29:29 +02:00
Script Kiddy 3dab9470e1 SVN_SILENT made messages (.desktop file) 2012-05-03 11:06:49 +02:00
Philipp Knechtges 9a1ad96e93 kwin: provide clipping for the TabBox thumbnails
BUG: 299198
REVIEW: 104399
2012-05-02 19:18:13 +02:00
Script Kiddy be7573445a SVN_SILENT made messages (.desktop file) 2012-05-01 17:26:20 +02:00
Martin Gräßlin f0c6f06241 Stacking Order becomes a list of Toplevel Windows
The common usage of stacking order is to loop through
the list and find a specific Client. All these usages
still need to find a Client. For that the loops are
adjusted to first cast the Toplevel into a Client and
continue if the current item is no Client.

At the moment all entries in the stacking order should
still be Clients as the Deleted are not yet added.
2012-04-20 08:36:24 +02:00
Script Kiddy 2ebc52e0a5 SVN_SILENT made messages (.desktop file) 2012-04-19 11:15:13 +02:00
Martin Gräßlin 611e225fd6 Horizontal center the Thumbnail ListView
This ensures that also for a small TabBox with just one item
the thumbnail is nicely centered.

REVIEW: 104541
CCBUG: 297856
2012-04-16 17:42:10 +02:00
Martin Gräßlin 3193b46108 Constrain width of text element in Thumbnail Layout
Fixes a layouting issue when caption does not fit into
the window switcher box.

REVIEW: 104507
CCBUG: 297028
2012-04-16 17:41:57 +02:00
Thomas Lübking 0fe48f971d use compositor to elevate current tabbox window
BUG: 297809
REVIEW: 104538
2012-04-14 23:22:05 +02:00
Script Kiddy 40c8c94460 SVN_SILENT made messages (.desktop file) 2012-04-11 09:43:26 +02:00
Script Kiddy 8ced79739f SVN_SILENT made messages (.desktop file) 2012-04-02 10:09:26 +02:00
Martin Gräßlin 27643f5a9e Drop kephal dependency from KWin
Kephal has turned into not being more than a wrapper around
QDesktopWidget and does not even provide syntax sugar.

REVIEW: 104427
2012-04-01 08:11:57 +02:00
Martin Gräßlin c16550f728 Use desktop icon for Show Desktop entry in TabBox
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
2012-04-01 08:06:12 +02:00
Martin Gräßlin 65819a0d68 Show windows from all screen in TabBox by default 2012-03-30 22:16:24 +02:00
Script Kiddy 7c117276b5 SVN_SILENT made messages (.desktop file) 2012-03-28 10:03:19 +02:00
Script Kiddy 27926dc74a SVN_SILENT made messages (.desktop file) 2012-03-27 17:41:47 +02:00
Script Kiddy 8011e80652 SVN_SILENT made messages (.desktop file) 2012-03-26 09:55:50 +02:00
Martin Gräßlin 524275f7cf Rename TabBox Layout "Present Window" to "Grid"
Better fitting name and it's not the same as Present Windows which
is also rather a technical name.
2012-03-25 14:44:41 +02:00
Martin Gräßlin c2ebd35cad Use Show desktop item instead of empty text in TabBox
If there are no windows for Alt+Tab the Show Desktop entry
is shown. This works better with both layouts and effects.
Before this change effects were not activated at all but
a fallback to the layouts was used. Concerning the layouts
some looked rather bad. E.g. Thumbnails did not show a
thumbnail but a legacy text had been shown.

When a window gets added to the empty list, the show desktop
window is removed and consequently when the last window goes
away the show desktop entry is added again.

There is a not considered corner case: if there is no desktop
window, the show desktop functionality is not available and
the behavior is unfortunately undefined. It is a corner case
as we can expect that there is always a desktop window when
using KWin. E.g. there is either Plasma Desktop or Netbook
and on PA there is always at least one window.

BUG: 260938
FIXED-IN: 4.9.0
REVIEW: 104379
2012-03-25 12:00:26 +02:00
Martin Gräßlin d03c73a223 Add proper key navigation to layout based window switchers
The grabbed key events inside TabBox are forwarded to the declarative
view which passes it to the normal keyPressedEvent() method. This
allows the QML files to handle keyboard navigation themselves.

The views support key navigation natively, though this cannot be
used as we need to update the ModelIndex when a new item is selected.
Also there seems to be a problem if the tabbox is shown again, in
that case the focus seems to be somehow lost. Because of that the
navigation is handled in the Item embedding the list.

REVIEW: 104357
FEATURE: 291916
FIXED-IN: 4.9.0
2012-03-25 11:55:35 +02:00
Martin Gräßlin 6073cd5f6b Present Windows like Window Switcher layout
This layout is intended to replace the TabBox mode in Present
Windows effect.
The advantages of a layout over the effect are:
* works without compositing
* supports multi-screen in a better way (windows don't move)
* is an overlay on top of the windows instead of reusing the windows
* is not a hack inside the actual effect
* visually consistent with other layouts
2012-03-25 11:54:32 +02:00
Script Kiddy 446ddcd134 SVN_SILENT made messages (.desktop file) 2012-03-24 11:23:48 +01:00
Aurélien Gâteau c44251d681 Rework tabbox compact layout a bit
- only use bold text for selected windows
- all icons are colored
- row for minimized windows are not fully opaque
- text for minimized windows is no longer italic

REVIEW: 104187
2012-03-22 08:57:16 +01:00
Albert Astals Cid e3d2cb9a61 Do not animate the highlight the first time the tabbox is shown
REVIEW: 104340
Acked by Martin Gräßlin
(cherry picked from commit 56345a9f158790e5f7102618c55c600cc688c855)

Conflicts:

	kwin/tabbox/declarative.cpp
	kwin/tabbox/declarative.h
2012-03-21 00:02:21 +01:00
Stefano Avallone 76c00aa189 Refactor checks for inclusion of TabBoxClients in the client list
REVIEW: 104025
2012-03-05 20:26:35 +01:00
Marco Martin 7a71ab72ea make sure the tapped window gets activated
if when the tabbox is open another window that does -not- appear in the tabbox gets focus, tapping on the same thumbnail as the last active window won't produce any effect, the patch makes sure that window gets activated, even if it has the currentIndex
REVIEW:104096
2012-02-29 16:43:12 +01:00
Script Kiddy dd026bdd9f SVN_SILENT made messages (.desktop file) 2012-02-29 10:25:11 +01:00
Marco Martin aeccc69103 the client marked as first shouldn't be closeable.
REVIEW:104093
2012-02-27 22:20:11 +01:00
Martin Gräßlin 212908ee88 Refactoring of KWin::Options: getter methods instead of public variables 2012-02-27 19:31:58 +01:00
Script Kiddy 3f9ba4d50e SVN_SILENT made messages (.desktop file) 2012-02-25 10:51:38 +01:00
Script Kiddy fc9dcf9e82 SVN_SILENT made messages (.desktop file) 2012-02-23 09:52:44 +01:00
Marco Martin 63c4bf15d5 use workspace signals to track geometry changes
connecting to a kwindowsystem signal that causes instantiation of
 kwindowsystemprivate breaks window focus.

this match makes it use internal kwin signals to track the embedding window geometry

REVIEW:104039
2012-02-21 23:08:28 +01:00
Script Kiddy 2acc689735 SVN_SILENT made messages (.desktop file) 2012-02-18 10:39:12 +01:00
Martin Gräßlin c950ec20e3 Add property to not show window strip in the layouts ui
Window Strip is only for Plasma Active, so we don't want to see
it in the UI for Window Switcher Layouts as it would not properly
work on the desktop anyway.

Accomplished by a simple property definition on the service file.
2012-02-16 10:08:15 +01:00
Martin Gräßlin 9297a8a9b2 Window Switcher layouts follow Plasma Package structure
A new service type is introduced which is used by the KCM to find
all available window switcher layouts. This makes it finally possible
to have 3rd party window switchers.

Also the tabbox finds the packaged QML file through the service
definitions.

Desktop switcher is not yet in packaged version (UI to configure
is missing).

REVIEW: 103951
2012-02-16 10:08:15 +01:00
Martin Gräßlin 7c6155a865 Drop xinerama related options
Behavior is now like all xinerama related options are enabled.
There seems to be no valid reasons to run multi screen without
xinerama support and even if a user would wish to do so she can
just disable xinerama in xorg.conf.

Furhtermore thanks to KWin scripting it is possible to achieve the
behavior as it used to be with the options disabled. E.g. it is
possible to span a window in fullscreen mode over all screens.

This change is in accordance to the discussion on kwin and plasma
mailinglists:
http://mail.kde.org/pipermail/plasma-devel/2012-January/018542.html
2012-02-09 16:52:39 +01:00
Marco Martin 2e7dbd232e fix layout 2012-02-02 16:23:34 +01:00
Marco Martin 8050ec0185 fix thumbnail position/size to not cover text 2012-01-31 15:57:38 +01:00
Stefano Avallone 2008982069 Add a Minimized combo box to TabBox
This allows to select whether TabBox should exclude minimized windows,
or only show minimized windows or just don't care about minimized windows.
This is the default and the behavior as it used to be.

Signed-off-by: Stefano Avallone <stavallo@unina.it>

REVIEW: 103698
2012-01-27 07:03:33 +01:00
Martin Gräßlin 2dfc1b0fcd Remove TabBoxConfig::SelectedItemViewPosition - not used anymore
Thanks to updating class diagrams to highlight what I should remove.
2012-01-19 19:45:47 +01:00
Martin Gräßlin 2e69668f99 Fix TabBoxHandler::containsPos for desktop switching box 2012-01-14 15:02:30 +01:00
Martin Gräßlin 58725981eb Drop more unused TabBox related code
Especially we do no longer need to invoke JavaScript methods from C++.
2012-01-14 15:01:42 +01:00
Martin Gräßlin 28dd3b1353 Adjust TabBox::handleMouseEvent for only declarative views
Makes mouse wheel work again.
2012-01-14 14:48:06 +01:00
Martin Gräßlin 9bb59dc1ed Fix incorrect merge from KDE/4.8 branch
CCMAIL afiestas@kde.org
2012-01-14 14:10:46 +01:00
Alex Fiestas 9e943bf39e Merge branch 'KDE/4.8'
Conflicts:
	kwin/tabbox/tabboxhandler.cpp
2012-01-14 13:25:19 +01:00
Martin Gräßlin a243d0b0b8 Delete highlight windows property from correct window
TabBox is always declarative view.
2012-01-14 11:55:39 +01:00
Martin Gräßlin c85452d517 Drop old (non QML) TabBox
This includes the delegates, the layout configuration for the delegates
and the custom view for the TabBox.

This can now finally be done as desktop tabbox is based on QML, too.
2012-01-14 11:51:35 +01:00
Martin Gräßlin e1cbb33631 Desktop Box support for QML based TabBox
First very simple layout just rendering icon and name.
Good enough for the start.
2012-01-14 11:51:35 +01:00
Martin Gräßlin 6f9f736973 Merge branch 'kwin/tabbox-window-strip' into integration 2011-12-21 07:45:52 +01:00
Marco Martin 1ccef778f1 if embedded in a window, forward the X events
makes possible to drag the Plasma active panel from the window strip
2011-12-15 17:47:23 +01:00
Martin Gräßlin fdfc479012 Move mouse area into the delegate
Fixes mouse clicks not being accepted in TabBox in case the view
had started to scroll.
2011-12-04 18:53:48 +01:00
Martin Gräßlin b770c56eec Do not close TabBox from window strip on click 2011-12-02 10:48:22 +01:00
Martin Gräßlin ff8c0e3f8f Emit a signal when an item gets selected 2011-12-02 10:48:04 +01:00
Martin Gräßlin e873efdc99 Adding an accept and reject method to TabBox 2011-12-02 10:31:52 +01:00
Martin Gräßlin f644c28180 Support for sticky items in TabBox list
This is needed for Plasma Active's home screen which should always
be the first element in the list.
2011-12-01 13:15:11 +01:00
Martin Gräßlin 5eb5a60cc5 Embedded mode for TabBox
DBus method to embedd the TabBox into another window. It follows
the geometry changes and keeps a defined offset to the borders of
the parent window.

Required for Plasma Active's window strip.
2011-12-01 08:48:18 +01:00
Martin Gräßlin b57ef77bf7 Adding a clip property to the ThumbnailItem
By default clip is enabled. This means that if the thumbnail would
overlap the "parent" window, it does not get rendered at all. If set
to false it will always be rendered. This is required for window strip
where the complete screen width is used, so overlap does not matter.
2011-11-29 07:15:32 +01:00
Martin Gräßlin cc6fa14c9b API improvements: open/close instead of start/close 2011-11-29 07:05:41 +01:00
Martin Gräßlin e858b413a3 Activate TabBoxClient from mouse click and close TabBox
This is useful in combination of non-modal TabBox through DBus and
window-strip layout. With DBus the non-modal TabBox can be started
and selecting any item on the strip will end TabBox again.
2011-11-27 17:03:35 +01:00
Martin Gräßlin 5a7120fbf5 Non-modal TabBox mode
Available through DBus. Be aware that this does not make much
sense, as there is no way to end TabBox mode except through the
DBus interface and this does not yet select the selected window.
2011-11-27 16:39:54 +01:00
Martin Gräßlin d2c7123dc6 TabBox becomes activatable through a DBus interface
Therefore TabBox is changed to be controlled without pressing a
modifier key. Tab and Backtab are valid keys now which can be
used to navigate in the list and return, enter and space can be
used to close the box (and select the client).

The TabBox is exported as object /TabBox on the kwin interface
providing start and close methods and signal when the TabBox got
closed.
2011-11-27 16:38:11 +01:00
Martin Gräßlin 245f84d835 Close windows from TabBox QML
Model exposes a method to close a window by index which is invoked
by the window strip QML.
2011-11-27 15:00:09 +01:00
Martin Gräßlin 9eb5a17e30 Support Closeable in TabBox
Needed by window strip to not add a close button to non-closeable
windows such as the desktop shell.
2011-11-27 14:15:49 +01:00
Martin Gräßlin efe439e2bc Include WindowStrip as TabBox layout 2011-11-27 14:05:44 +01:00
Martin Gräßlin 252c21e903 Use 128x128 for big icons TabBox 2011-11-12 22:42:04 +01:00
Martin Gräßlin d89b9b3abe Do not stretch icons but use the smaller one with padding
Thanks to Iceweasel for providing a maximum icon of 48x48 which
looks really bad when upscaled to 128x128. Orig icon is placed
in the center of a new pixmap in requested size.
2011-11-12 22:39:01 +01:00
Martin Gräßlin f27a00d8cd Setting a maximum highlight move duration on the TabBox layouts
Makes the wrapping around the corners much more usable...
2011-11-12 22:16:02 +01:00
Martin Gräßlin 219d0cc6a9 KConf Update for TabBox QML
* BoxSwitch users are migrated to new QML TabBox thumbnails layout
* Thumbnail layout is new default (as before was BoxSwitch)
* Removed obsoleted settings from TabBox config
2011-11-12 21:50:18 +01:00
Martin Gräßlin 571a87a0b7 Safetey check in TabBox's Image Provider
We cannot provide pixmaps if the client is null or the index
is for "there are no windows".
2011-11-10 21:23:14 +01:00
Martin Gräßlin 43109f7264 Caption of selected item underneath icon only TabBox 2011-11-10 20:44:05 +01:00
Martin Gräßlin f98593d3fb Window Thumbnail support for QML
A new QML item "ThumbnailItem" is registered to the TabBox. The
C++ implementation finds the EffectWindow of the TabBox and adds
itself to the EffectWindow.

While rendering the EffectWindow the information for all registered
ThumbnailItems are extracted and the thumbnail is rendered on top
of the EffectWindow.

This has obvious limitations like you cannot put other QML items
on top of the thumbnail. Nevertheless it works well enough to
be a possible replacement for e.g. BoxSwitch effect.

When compositing is disabled an icon is rendered instead of the
Thumbnail.

One TabBox Layout inspired by BoxSwitch Effect is added. For the
KCM small pre-rendered items are used.

REVIEW: 103039
2011-11-10 14:28:06 +01:00
Martin Gräßlin c20e9c18c2 Load main QML file while creating TabBox View
Layout loading still delayed till first show event.
2011-11-04 20:08:23 +01:00
Martin Gräßlin ba98af770a Add safety check for invalid ModelIndex
With the new QML tabbox it could happen that the index is not
valid and nothing is selected in the view.
2011-11-04 19:27:02 +01:00
Martin Gräßlin 8b9e7f56cf Pass mouse events to declarative Tabbox
The ListViews have therefore to emit a signal when the item changed
due to a mouse click event.
2011-10-31 14:34:37 +01:00
Martin Gräßlin 17834ae3f9 Request Icons in Correct Size 2011-10-31 08:51:34 +01:00
Martin Gräßlin 08d6f62ae7 New TabBox Layout configuration dialog
This dialog shows all available layouts with a preview.
2011-10-31 08:41:07 +01:00
Martin Gräßlin a38c0e31ca Adding new properties for optimalWidth/Height 2011-10-30 21:56:25 +01:00
Martin Gräßlin aa17081fe8 TabBox in QML
All the default layouts (informative, compact, text, small and big icons)
are rewritten in QML and replace the ListView used before. The old code
is still around for the desktop switching modes which are not yet ported.

Next steps include to update the configuration module to not show now
obsoleted settings as well as providing a better way to choose the layout.

REVIEW: 102948
2011-10-30 16:07:14 +01:00
Jonathan Marten 17c6b3b2db Make the Walk Through Desktop List and Reverse actions work again
With a comment to explain the non-obvious global shortcut setting.

BUG:279638
REVIEW:102558
2011-09-10 11:39:10 +01:00
Arthur Arlt 5d2f8356f4 Make reconfigure() a Q_SLOT
make reconfigure() a Q_SLOT and connect to the signal configChanged()
of class Workspace.

REVIEW: 101942
2011-07-15 22:23:29 +02:00
Martin Gräßlin f89ba7a382 Move tabbox.(h|cpp) to tabbox sub directory 2011-07-15 17:22:41 +02:00
Martin Gräßlin 9cb53d5d30 Create TabBoxView when first used
When effects are active we never need the "classic" TabBoxView.
Nevertheless it was always created when KWin started up. By
delaying the creation some ressources should be saved if the user
only uses effects.

REVIEW: 101897
2011-07-12 21:02:57 +02:00
Martin Gräßlin 2ce4d166a1 Move loading of the TabBox Config XML into a thread
This should improve the KWin startup time as some IO is moved
into another thread. Till the config is loaded the TabBox blocks
all signals to activate the TabBox, but it is unlikely that alt+tab
is tried to be used before KWin is completely started.
2011-07-12 21:02:48 +02:00
Martin Gräßlin c703dca4b2 Remove leftover from splitting out the Outline handling
Should have been removed with 44b83f951aeb3221c43ef3356e46650248b673cd
2011-07-09 11:25:49 +02:00
Martin Gräßlin ff3900d825 Refactor KWin Outline code into an own class
This change unduplicates some code and merges it into one class
allowing us to use an replacement effect for the outline in
future.
CCMAIL: a.arlt@stud.uni-heidelberg.de
REVIEW: 100848
2011-04-28 11:19:05 +02:00
Thomas Lübking 096691db01 secure referenced windows in uncomposited tabbox highlighting
forward port of 8aa28760efc3a77d0e8f48b6ede142d898b44856
BUG: 263250
2011-02-14 21:17:49 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking 647eaa8afb raise alt+tab selected window w/o compositing (requires highlight windows option to be checked)
unlink composited window highlighting from the tabbox
-> results in semi-legacy behaviour w/o activating the selected window

BUG: 227344

svn path=/trunk/KDE/kdebase/workspace/; revision=1186871
2010-10-17 19:49:07 +00:00
Martin Gräßlin 5b54bb1d03 Forward port rev 1137263:
Make icon sizes 64x64 and 128x128 available in KWin and use it in TabBox for large icon modes.
So no more ugly upscaling.
CCBUG: 241384

svn path=/trunk/KDE/kdebase/workspace/; revision=1137264
2010-06-12 06:56:40 +00:00
Martin Gräßlin 752580496b Blur behind tabbox
svn path=/trunk/KDE/kdebase/workspace/; revision=1134066
2010-06-03 10:33:52 +00:00
Martin Gräßlin f099f6323b Too long titles in tabbox are probably elided in the middle as the application name is on the right.
svn path=/trunk/KDE/kdebase/workspace/; revision=1130021
2010-05-24 08:26:25 +00:00
Martin Gräßlin 445273c021 Sometimes warnings about missing parenthesis are correct
svn path=/trunk/KDE/kdebase/workspace/; revision=1130020
2010-05-24 08:20:28 +00:00
Martin Gräßlin 612864aed2 An tabbox item may never be bigger than the screen.
BUG: 235143

svn path=/trunk/KDE/kdebase/workspace/; revision=1130011
2010-05-24 08:00:59 +00:00
Martin Gräßlin 7277ec7450 Add optional desktop entry to alt+tab for minimizing all windows (show desktop).
FEATURE: 167644

svn path=/trunk/KDE/kdebase/workspace/; revision=1105144
2010-03-19 10:15:56 +00:00
Martin Gräßlin 551bcc2959 Do not show the desktop name when using a tabbox mode which only includes windows from current desktop. In that case the information is redundant as all windows are on the same desktop.
svn path=/trunk/KDE/kdebase/workspace/; revision=1104681
2010-03-18 09:54:03 +00:00
Martin Gräßlin 8d2178ad5d Correctly handle mouse clicks in TabBox when there is an additional view.
BUG: 226877

svn path=/trunk/KDE/kdebase/workspace/; revision=1103492
2010-03-15 08:39:40 +00:00