Commit Graph

218 Commits (a3faf455b983fbb40779accec96d8b8703804c5e)

Author SHA1 Message Date
Thomas Lübking 036794e7de restore inputfocus after assigning window shortcut
BUG: 314760
FIXED-IN: 4.10.1
REVIEW: 108887
2013-02-12 20:50:27 +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
Martin Gräßlin ebf1bc47a9 Do not clear UserActionMenu's Client after the menu closed
The Client is still needed as the invoked action might be delayed by one
event cycle to work around a crash if the operation causes the deco to
close.

BUG: 312004
FIXED-IN: 4.10 RC 2
REVIEW: 107823
2012-12-22 11:44:02 +01:00
Thomas Lübking 1c83b957cc queue all menu caused window ops
BUG: 310658
REVIEW: 107462
FIXED-IN: 4.10
2012-11-29 20:17:36 +01:00
Ignat Semenov fa4bbea419 fix building with KWIN_BUILD_KAPPMENU set to off 2012-11-13 14:43:07 +04:00
Cedric Bellegarde 53ae2b91e2 GUI: Kwin appmenu support:
- Add support for application menu button in Kwin
- Add kded appmenu configuration in kcm_style
2012-11-09 13:44:50 +01:00
Martin Gräßlin 2764565f9d Allow Scripts to add menus to the UserActionsMenu
A script can register a callback through registerUserActionsMenu to be
informed when the UserActionsMenu is about to be shown. This menu calls
the Scripting component to gather actions to add to a Scripts submenu.

The Scripting component now asks all scripts for the actions, which will
invoke the registered callbacks with the Client for which the menu is to
be shown as argument.

The callback is supposed to return a JSON structure describing how the
menu should look like. The returned object can either be a menu item or
a complete menu. If multiple menu items or menus are supposed to be added
by the script it should just register multiple callbacks.

The structure for an item looks like the following:
{
    text: "My caption",
    checkable: true,
    checked: false,
    triggered: function (action) {
       print("The triggered action as parameter");
    }
}

The structure for a complete menu looks quite similar:
{
    text: "My menu caption",
    items: [
         {...}, {...} // items as described above
    ]
}

The C++ part of the script parses the returned object and generates
either QAction or QMenu from it. All objects become children of the
scripts QMenu provided by the UserActionsMenu.

Before the menu is shown again the existing menu is deleted to ensure
that no outdated values from no longer existing scripts are around. This
means the scripts are queried each time the menu is shown.

FEATURE: 303756
FIXED-IN: 4.10
REVIEW: 106285
2012-09-07 07:32:00 +02:00
Martin Gräßlin 35237aadcb Splitting up of KWin's global D-Bus interface
Two new interfaces are introduced:
* org.kde.kwin.Compositing
* org.kde.kwin.Effects

The Compositing interface is generated from scriptable elements on the
KWin::Compositor class and the Compositor is exported as /Compositor.
It provides the general Compositing related D-Bus methods like whether
the compositor is active and toggling and so on.

The Effects interface is generated from scriptable elements on the
KWin::EffectsHandlerImpl class and the instance is exported as /Effects.
It provides all the effects related D-Bus methods like loading an effect
or the list of all effects.

This removes the need to have all these methods provided on the global
org.kde.KWin interface. For backwards compatibility they are kept, but
no longer provided by the Workspace class. Instead a new DBusInterface
is generated which wrapps the calls and delegates it to one of our three
related Singleton objects:
* Workspace
* Compositor
* EffectsHandlerImpl
2012-09-06 09:58:12 +02:00
Thomas Lübking 952579bb09 fix untabbing position
the geometry setting needs to happen out of recursion,
has to be smarter for unmaximizing and also no real
place in TabGroup - the client is no longer tabbed thus
it's not the groups task to manage it's geometry.

BUG: 226881
REVIEW: 106182
FIXED-IN: 4.9.1
2012-08-28 21:08:03 +02:00
Martin Gräßlin 46996d318e Split the User Actions Menu out of Workspace
All methods and variables related to the User Actions Menu
(rmb window deco, Alt+F3) is moved out of the Workspace class
into an own UserActionsMenu class.

The class needs only a very small public interface containing
methods to show the menu for a Client, closing the menu and
discarding the menu. Everything else is actually private to the
implementation which is one of the reasons why it makes sense
to split the functionality out of the Workspace class.

As a result the methods and variables have more sane names and
the variable names are standardized.

REVIEW: 106085
BUG: 305832
FIXED-IN: 4.10
2012-08-26 20:32:31 +02:00
Martin Gräßlin 5042ca2bdc Adding a screen menu to the Client's useraction menu
New "Move To Screen" menu is shown after the "Move To Desktop"
menu if there are multiple screens and the window can be moved
to another screen. Menu contains one radio button for each
screen.

Selecting an entry sends the Client to the selected screen.

BUG: 269207
FIXED-IN: 4.10
REVIEW: 106065
2012-08-18 09:45:30 +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 23f2de009b Effects can provide support information through properties
The supportInformation is extended to also read the properties
on all effects. In addition each effect can be queried just for
itself through D-Bus, e.g.:
qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur

All effects are extended to provide their configured and read
settings through properties. In some cases also important
runtime information is exposed.

REVIEW: 105977
BUG: 305338
FIXED-IN: 4.9.1
2012-08-17 17:49:49 +02:00
Martin Gräßlin a394fade64 Remove Tiling support from KWin
As discussed on the mailinglist [1] the tiling support is
removed from KWin. The main reasons for this step are:
* it is unmaintained
* it is a mode not used by any of the core KWin team
* original developer said at Akademy 2012 that he is not
  interested in picking up the work again
* tiling has quite some bugs, e.g. multi screen not supported
* is conflicting with other concepts in KWin, e.g. activities

There is ongoing work to get tiling supported through a KWin
script, which is a preferred way as it does not influence the
existing C++ code base.

[1] http://lists.kde.org/?l=kwin&m=133149673110558&w=2
BUG: 303090
FIXED-IN: 4.10
REVIEW: 105546
2012-07-14 11:18:06 +02:00
Martin Gräßlin 5517d4db2c Delay closing of a window by one event cycle
This is an issue we already had in the past with Aurorae. When
closing a window the graphics scene crashes because the deco
gets destroyed before the code in the graphics scene finished
the execution.

With the port to QML this seemed to be fixed unless as it turns
out it throws an XIO error on closing:
fatal IO error 11 (Resource temporarily unavailable) on X server ":0"

This can be triggered using glxgears. Closing glxgears would
reliable crash Aurorae. To circumvent this issue we have to
delay the close by one event cycle using QMetaObject's
invokeMethod with a Qt::QueuedConnection.

This has also to be done in the useractions menu as the menu
is still open when the window closes causing the same problem
inside Aurorae.

BUG: 303450
FIXED-IN: 4.9.0
Reviewed-By: Thomas Lüking
2012-07-14 11:11:02 +02:00
Martin Gräßlin 6e70ed2087 Add missing break in case statment
This would have resulted in tiling specific code being executed
whenever a window tab group would have been closed.

REVIEW: 105547
2012-07-13 14:35:42 +02:00
Martin Gräßlin bbf13c1fe5 Fix switching to window left/right/up/down
Regression introduced with
2ae475cedefc7521a03602bf163864f08caad23e

BUG: 301079
FIXED-IN: 4.9.0
REVIEW: 105138
2012-06-03 21:07:49 +02:00
Thomas Lübking 070b84b2e3 change verbalized "Tab behind" to "Attach as tab to"
BUG: 300156
FIXED-IN: 4.9
2012-05-17 15:05:49 +02:00
makis marimpis 7de8f5e7fe Add activity support for desktop focus chains.
REVIEW: 104649
BUG: 299309
FIXED-IN: 4.9.0
2012-05-06 15:31:21 +02:00
makis marimpis a9e66dc7f3 "New Desktop" in to Desktop menu
Adding a new desktop entry to create a new desktop and move the
selected window there.

REVIEW: 104781
2012-05-03 16:42:25 +02:00
Thomas Lübking 77dbf4082f support tabs in directional window switching shortcuts
BUG: 296096
REVIEW: 104293
FIXED-IN: 4.9
2012-04-30 22:37:40 +02:00
Thomas Lübking 9ca81a2f79 move sync dbus calls to kactivitymanagerd into extra thread
to prevent broken dbus chain from blocking the compositor

CCBUG: 293104
REVIEW: 104563
2012-04-20 23:59:37 +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
Thomas Lübking ab86f0e837 add screen inversion through XF86VidModeSetGammaRamp or XRRSetCrtcGamma
use opengl invert effect as fallback

REVIEW: 104371
2012-04-17 21:11:03 +02:00
Thomas Lübking 3cbdca162a make the rmb popup move trigger an unrestricted move
BUG: 229942
FIXED-IN: 4.9
REVIEW: 104620
2012-04-17 21:09:09 +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 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
Christoph Feck 75a26a41b2 Fix build
CCMAIL: kwin@kde.org
2012-03-08 00:25:08 +01:00
Thomas Lübking 357b6b5338 resolve merge conflict 2012-03-07 22:02:26 +01:00
Thomas Lübking 3f0b4826dd - lower windows does not change focus for F(S)UM
- lower by shortcut honors nextFocusPrefersMouse setting

CCBUG: 80897
REVIEW: 104041
2012-03-07 20:49:44 +01:00
Martin Gräßlin 212908ee88 Refactoring of KWin::Options: getter methods instead of public variables 2012-02-27 19:31:58 +01:00
Thomas Lübking b79a176be3 resolve merge conflicts 2012-02-21 19:22:08 +01:00
Thomas Lübking 67f484e825 fix negation logic error ... 2012-02-21 18:42:09 +01:00
Thomas Lübking 2123fb8dbd select proper client for shortcuts and guard pointer
REVIEW: 103998
2012-02-21 17:18:04 +01:00
Thomas Lübking 7e7846adce Focus window under mouse after MouseLowerOp
BUG: 255052
REVIEW: 103975
2012-02-21 17:18:04 +01:00
Thomas Lübking 85635dd485 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:30:22 +01:00
Thomas Lübking bf88ec09ac Revert "fix tabbing"
pushed out of branch, not master - leading to absent revision, found hash collision??

This reverts commit 94b2ad7b85801e37e2df4671cdc4f26b6d7e5506.
2012-02-11 16:29:14 +01:00
Thomas Lübking d245035a17 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:01:41 +01:00
Christophe Giboudeaux 8426e13f3a Fix includes 2011-12-05 15:33:14 +01:00
Aaron Seigo dde6a17a0f use libkactivities 2011-11-04 23:23:52 +01:00
Thomas Lübking 770df8c66b Force input replay for non activatable windows
BUG: 283474
REVIEW: 102795
FIXED-IN: 4.8
2011-10-10 20:47:00 +02:00
Martin Gräßlin cdfd98e926 Drop the opacity menu in KWin useractions menu (Alt+F3)
See discussion on mailinglist:
http://lists.kde.org/?l=kwin&m=131368803718693&w=2

REVIEW: 102376
2011-08-29 06:59:40 +02:00
Martin Gräßlin 2f3c383ecd Add shortcuts to lower/raise opacity
REVIEW: 102374
2011-08-29 06:59:13 +02:00
Jaime Torres 664aaa1b60 ++ prefix for non-trivial data-types
change suffix ++ to prefix ++ to speed up a little bit not-trivial
data-types. discovered by cppcheck

REVIEW: 102057
2011-08-02 17:21:56 +02:00
Arthur Arlt e79cf50087 Rename some functions and variables in class Tiling
Some functions and variables were given more proper names and are now
following the naming scheme. 'Redundant' naming information was also removed.

REVIEW: 102020
2011-07-28 13:55:30 +02:00
Arthur Arlt 8c3a0e218a Move tile.cpp, tile.h, tilinglayout.cpp and tiling.h to directory tiling/
The three files are moved to the directory tiling/ and the includes were
adjusted as well as the CMakeLists.txt file.
2011-07-28 13:39:28 +02:00
Arthur Arlt 1326316049 Introduce Build Option for Tiling
A build option is introduced to file CMakeLists.txt. Classes Tiling,
Tile and TilingLayouts are only built if the option is set to ON. #ifdef's
are added to the classes where functions of the excluded classes are called.
2011-07-28 13:39:21 +02:00
Arthur Arlt b1e3c7ba38 Move initialization of shortcuts to separate method in new Tiling class 2011-07-28 13:06:30 +02:00