Commit Graph

256 Commits (c094c7e7cd26ae7622b6e05db932e1d438d6ce1b)

Author SHA1 Message Date
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