Commit Graph

248 Commits (6d0d9cfe43cca99990d99c6f93fd5dc96cbc9cef)

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