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
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()
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>
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
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
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
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
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
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
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
- 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
REVIEW: 104340
Acked by Martin Gräßlin
(cherry picked from commit 56345a9f158790e5f7102618c55c600cc688c855)
Conflicts:
kwin/tabbox/declarative.cpp
kwin/tabbox/declarative.h
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
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
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