Commit graph

9065 commits

Author SHA1 Message Date
Thomas Lübking
41eea9dd3b Don't highlight windows w/o mouse
CCBUG: 292630
REVIEW: 104264
2012-03-30 15:27:37 +02:00
Thomas Lübking
a9478564d8 raise window during shade hover
BUG: 281435
REVIEW: 104280
2012-03-30 15:27:14 +02:00
Thomas Lübking
c900455599 don't hover unshade while moving
BUG: 223074
REVIEW: 104280
2012-03-30 15:27:02 +02:00
Thomas Lübking
df32d86d84 fix some value inits for the no pushback case
CCBUG: 296762
REVIEW: 104420
2012-03-30 15:26:22 +02:00
Thomas Lübking
06ab909eb2 check for requested opengl graphicssystem rather than raster twice ;-) 2012-03-30 15:25:49 +02:00
Martin Gräßlin
2fb8fb1c21 Introducing a build option for KActivities support
REVIEW: 104100
2012-03-30 09:13:46 +02:00
Martin Gräßlin
42dfdb63b0 Global Shortcut support for KWin scripts and scripted Effects
A global method "registerShortcut" is exported to the scripts which
can be used to register a callback to be called when the global
shortcut is triggered.

The shared code between Scripts and Effects is moved into template
functions defined in a new file scriptingutils.h.

REVIEW: 104400
2012-03-30 08:20:10 +02:00
Script Kiddy
7c117276b5 SVN_SILENT made messages (.desktop file) 2012-03-28 10:03:19 +02:00
Martin Gräßlin
e0f97946af Add QML specific export of ClientList
Sometimes Qt is surprising. Apparently QML has problems with a
QList<KWin::Client*> and wants to have a QList<QObject*> which
cannot be used in QtScript.

There ends my dream of having one API for both JavaScript and QML.
So with QtScript it is:
workspace.clientList()
and in QML it is:
workspace.getClientList()
2012-03-27 22:21:06 +02:00
Script Kiddy
27926dc74a SVN_SILENT made messages (.desktop file) 2012-03-27 17:41:47 +02:00
Martin Gräßlin
361d6ed4c3 Navigate to the GraphicsView's toplevel widget to find the thumbnail's window
The GraphicsView which renders the ThumbnailItem does not have to be
a toplevel widget. If it has a parent we have to navigate to the top level
parent widget and compare the window Id on this widget. If it matches the
one of the window we are currently rendering, we know that we found the
correct GraphicsView.

Reviewed-By: Philipp Knechtges <philipp-dev@knechtges.com>
2012-03-26 19:19:58 +02:00
Script Kiddy
8011e80652 SVN_SILENT made messages (.desktop file) 2012-03-26 09:55:50 +02:00
Philipp Knechtges
94b93c5fbc kwin: paint ThumbnailItem at the right position 2012-03-25 20:06:26 +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
18a667e190 Do not use GraphicsScene to calculate Thumbnail position
Instead of using the scene it is better to use the toplevel
item's parent position. This works better in case the scene
is endless and the toplevel item is not positioned at 0/0 as
it is the case for anything from Plasma.

There are still slight layouting issues which I think is
caused by thumbnails not honouring the margin. Will investigate.

REVIEW: 104395
2012-03-25 13:04:18 +02:00
Martin Gräßlin
483ad7db66 Support specifying the parent window on which the thumbnail is shown
ThumbnailItem tries to find the window where it is embedded in
through a context propery containing the window id of the declarative
view. This works fine for e.g. TabBox but not for Plasma.Dialog as
that opens a new window.

REVIEW: 104394
2012-03-25 13:04:18 +02:00
Martin Gräßlin
6fa9d35322 Use an ActionGroup for Move To Desktop entries
Virtual Desktops are mutual exclusive, so an ActionGroup
is better suited.

REVIEW: 104378
2012-03-25 12:56:33 +02:00
Martin Gräßlin
8837cc8681 Synchronise useractions menu with taskmanager
Changes the order of the useractions menu to fit the one of
taskmanager. There are still some differences:
* Taskmanager is missing Activities menu
* Taskmanager is missing Window Tabbing support
* Taskmanager is missing window settings (e.g. shortcut)
* Useractions is missing launcher support

REVIEW: 104374
FEATURE: 296056
FIXED-IN: 4.9.0
2012-03-25 12:56:33 +02:00
Martin Gräßlin
4b7ee9928d Rename "Configure Window Behavior" to "Window Manager Settings"
The context menu entry to "Configure Window Behavior" opens the
configuration of the window manager and not about the window.
In the past the shown configuration dialog only contained entries
affecting the window behavior but that is no longer true for the
complete KDE 4.x series since Desktop Effects had been added to
the menu. This change in naming reflects the situation and should
help to remove confusion.

At the same time the entry is moved into the advanced section.

FEATURE: 249486
FIXED-IN: 4.9.0
REVIEW: 104284
2012-03-25 12:56:33 +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
55480be88b Remove Present Windows from TabBox KCM
Present Windows is nowadays a layout so it should no longer
appear in the effects replacement list.
2012-03-25 11:54:32 +02:00
Martin Gräßlin
5ac29a5984 Remove TabBox related code from PresentWindows Effect
Present Windows mode has been replaced by a window switcher
layout which obsoletes the hack inside the present windows
effect.
2012-03-25 11:54:32 +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
Martin Gräßlin
dab146422a Make KWin::Client known to QML 2012-03-24 10:49:21 +01:00
Martin Gräßlin
81c6eeb4f4 Remove commented code from old scripting
SVN_SILENT
2012-03-24 08:11:10 +01:00
Martin Gräßlin
05198bc2b7 Ifdef XRender related code in Screenshot effect
For PA KWin is compiled without XRender but with Screenshot effect
causing the compile to fail.
2012-03-24 08:08:12 +01:00
Thomas Lübking
7b3ee21cd3 [Janitorial] Remove unused function
resetMaximize is done in changeMaximize since ages
2012-03-22 19:35:48 +01:00
Christoph Thielecke
99b233e2ed define missing defines if nessary 2012-03-22 15:10:30 +01:00
Script Kiddy
2440a67990 SVN_SILENT made messages (.desktop file) 2012-03-22 09:23:55 +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
Martin Gräßlin
c802e2bfca Remove extra space in right title button group
Request from Nuno :-)
REVIEW: 104303
2012-03-22 06:49:08 +01:00
Martin Gräßlin
da76386fb0 Repaint Thumbnail Item on window damage
Allows to have live updates for thumbnails in tabbox.
BUG: 296066
FIXED-IN: 4.9.0
REVIEW: 104301
2012-03-22 06:48:42 +01:00
Martin Gräßlin
40970a32f1 Drop workaround for BUG 157659
Workaround for a Qt4.4RC1 redrawing bug is no longer needed.
CCBUG: 157659
REVIEW: 104300
2012-03-22 06:46:33 +01:00
Thomas Lübking
eb83686d56 [Janitorial] Remove legacy "rules" to ignore position request and focus stealing prevention
REVIEW: 104274
2012-03-21 22:32:33 +01:00
Thomas Lübking
e8bc821848 fake a move event when dropping out of quick tiling
BUG: 228815
REVIEW: 104347
2012-03-21 22:32:33 +01:00
Martin Gräßlin
98ce0cbc78 Add parameter names to signals in KWin Scripting
Apparently needed for QML bindings.
2012-03-21 18:55:32 +01:00
Thomas Lübking
88aeec920e re-add SceneXRender::paintGenericScreen implementation to cache screen_paint data 2012-03-21 00:37:10 +01:00
Thomas Lübking
1070bf895b split decorationRect / visibleRect usage
REVIEW: 104215

cherry-picked from 0f3380f3b10e57416f81a1288dc10b8dfe11d87e
Conflicts:

	kwin/geometry.cpp
	kwin/scene.cpp
2012-03-21 00:36:50 +01:00
Thomas Lübking
5bf62e5308 add xrender support to screenshot effect
REVIEW: 104152
cherry-picked from 30ee236d9d7a9c42d763fa4704156846cfa6af25
2012-03-21 00:36:29 +01:00
Thomas Lübking
5e2414544f add offscreen render support to xrender
REVIEW: 104151
cherry-picked from b9534b4ca82973c2e99451b2e151241fd1b6e7cb
2012-03-21 00:35:31 +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
Thomas Lübking
ef71908c6a fix ShortcutDialog to allow clearing the shortcut
BUG: 234793
REVIEW: 104336
2012-03-18 22:23:27 +01:00
Thomas Lübking
218baa9dbe swap strictGeometry for isFullScreen case in sizeForClientSize
ratio:
it's the same preference in isFullScreenable, allows clients which do not withdraw their
restrictions (like aspect etc.) or get fullscreen artificially (like through kstart) to start in
"real" fullscreen mode.

BUG: 146741
REVIEW: 104331
2012-03-18 22:23:27 +01:00
Thomas Lübking
e99dc3ab5b handle ungrab crossings for FFM & mouse preference
BUG: 142040
REVIEW: 104316
2012-03-18 22:23:27 +01:00
Thomas Lübking
1cedbe6c23 fix new shadow update repaints
resetting is no longer needed with philip layer changes and actually
breaks damages on simultaneous resizes
also use addLayerRepaint for the shadow update

REVIEW: 104306
2012-03-18 22:23:26 +01:00
Thomas Lübking
dd1b6cb05f special case keepAbove Docks
This can be used by (autohiding) panels to get the panel above other keepAbove windows
Since the activation still impact the stacking order, the panel should still use
QWidget::raise() or eventually KWindowSystem::raiseWindow(WId win) to (forcefully) get the panel on top.

NOTICE: latter is actually a call for tools like pagers and taskbars, don't abuse it but
preferably use QWidget::raise() instead. Unless the user doesn't type into the keepAbove window while
activating the panel at the same time, this *should* be sufficient.

BUG: 203931
REVIEW: 104279
2012-03-18 22:23:26 +01:00
Thomas Lübking
fe96a02960 align special application settings dialog title
BUG: 288586
FIXED-IN: 4.9
REVIEW: 104279
2012-03-18 22:23:26 +01:00
Script Kiddy
6928b027c7 SVN_SILENT made messages (.desktop file) 2012-03-18 10:15:43 +01:00