Commit Graph

80 Commits (2c169e4bca46289536eb96ed105e63d0b5714772)

Author SHA1 Message Date
Thomas Lübking 93fb58aa88 Merge branch 'Plasma/5.2' 2015-02-06 00:29:55 +01:00
Thomas Lübking ff700a8db5 fix e3768b4355
accidentally picked the patch from the wrong branch
just about comments
2015-02-06 00:27:31 +01:00
Thomas Lübking 956941bc95 correctly handle virtual desktop on packing
copy approach from smart placement

REVIEW: 122417
2015-02-05 21:37:34 +01:00
Thomas Lübking f496a91e59 updateFocusMousePosition() before some actions
in particular artificial geometry updates that should not
update the focus and are prone to a static cursor

BUG: 343319
REVIEW: 122299
FIXED-IN: 5.2.1
2015-02-05 21:37:33 +01:00
Thomas Lübking fa1368cb9e correctly handle virtual desktop on packing
copy approach from smart placement

REVIEW: 122417
2015-02-05 17:14:23 +01:00
Thomas Lübking e3768b4355 updateFocusMousePosition() before some actions
in particular artificial geometry updates that should not
update the focus and are prone to a static cursor

BUG: 343319
REVIEW: 122299
FIXED-IN: 5.2.1
2015-02-05 17:05:34 +01:00
Martin Gräßlin 2076e458d3 Use Xcb::GeometryHints instead of XGetWMNormalHints
Xcb::GeometryHints is a convenient wrapper around the size hints
as described in ICCCM combined with the sanity checks so far applied
by KWin after reading the property.

Instead of accessing the members of the property structure, we are
now using the convenience methods.

During ::manage no further actions are triggered when reading the
size hints. Only when they are read later on the previous checks
are applied. During ::manage they can be ignored as it had a dedicated
isManaged check.

The method ::resizeWithCheck got a new argument of type xcb_gravity_t
which defaults to 0. This is needed from ::configureRequest which so
far temporarily changed the xSizeHints structure. By passing as an
argument this is no longer needed.

REVIEW: 122185
2015-01-27 12:48:03 +01:00
Kai Uwe Broulik 2153174dc0 Add OnScreenDisplayLayer which is placed even ontop of the active fullscreen window
It is to be used for volume change feedback and similar confirmation popups

REVIEW: 121300
2015-01-02 12:11:54 +01:00
Martin Gräßlin 3d9a035312 Move MaximizeMode from KDecorationDefines to utils.h
Unfortunately it cannot be a enum defined in Client as client.h
depends on rules.h and with it in Client rules.h would depend on
client.h.
2014-12-02 13:49:08 +01:00
Martin Gräßlin 50019b4a31 Drop kdecoration.h include from placement.cpp 2014-12-02 11:48:51 +01:00
Martin Gräßlin fa4332754c Move Position from KDecorationDefines to Client 2014-12-02 11:15:54 +01:00
Martin Gräßlin e38d56b0dd Move QuickTileMode from KDecorationDefines to Client 2014-12-02 10:52:16 +01:00
Martin Gräßlin 9075b5e2d6 [kwin] Remove cursorPos() from utils.h
Only delegated to Cursor::pos() anyway, so let's just use that directly.
Fixes the annoyances of having to mock it in the unit tests which include
utils.cpp.

REVIEW: 116900
2014-03-25 15:25:40 +01:00
Martin Klapetek 404fc2144c [kwin] Make KWin place the OSD
REVIEW: 115334
2014-02-12 10:53:10 +01:00
Thomas Lübking 26febda4a0 Merge branch 'KDE/4.11'
Conflicts:
	ksmserver/screenlocker/greeter/greeterapp.cpp
	ksmserver/screenlocker/greeter/greeterapp.h
	ksmserver/screenlocker/greeter/themes/org.kde.passworddialog/contents/ui/main.qml
	kwin/libkwineffects/kwineffects.cpp
	kwin/useractions.cpp
	plasma/desktop/applets/window-list/metadata.desktop
	plasma/desktop/containments/panel/plasma-containment-panel.desktop
	plasma/desktop/toolboxes/plasma-toolbox-paneltoolbox.desktop
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
2013-11-24 15:35:17 +01:00
Thomas Lübking 6e56dcd60a remove false noop breaking branches
BUG: 328007
FIXED-IN: 4.11.4
2013-11-24 14:21:35 +01:00
Thomas Lübking 3594550b14 Merge branch 'KDE/4.11'
Conflicts:
	kwin/eglonxbackend.cpp
	kwin/glxbackend.cpp
2013-09-25 23:21:36 +02:00
Thomas Lübking 06b482f725 pack to client, not deco
this makes packing following the snapping behavior

REVIEW: 112807
2013-09-25 23:09:08 +02:00
Martin Gräßlin 969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Thomas Lübking 7d6d80351c align zero corner placement to client, not deco
BUG: 318107
FIXED-IN: 4.11.1
REVIEW: 112102
2013-08-27 07:53:02 +02:00
Martin Gräßlin 9291b18cee Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-08-07 10:10:06 +02:00
Thomas Lübking f4827fbac9 update packing logics to honor activities and tabs
at the same time using MaximizeArea instead MoveArea

ratio:
movearea allows to pack windows under panels and while
one can expect users of packing to know alt+lmb, we usually
do not allow to loose the titlebar

Moreover this relies on packing against dock windows what
fails with "virtual" struts as input shaping panels
(eg. cairo-dock?) might use (ie. we we would also have packed
against plasma panel shadows - back then ;-)

BUG: 180084
REVIEW: 111603
FIXED-IN: 4.11
2013-08-02 22:00:45 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Thomas Lübking 16ee964eb7 Ignore the desktop on smart placement
The desktop usually intersects all windows and
by this pollutes the heuristics with its punishment
2013-06-26 12:42:10 +02:00
Martin Gräßlin fc4f431bfb Remove Workspace pointer from Placement 2013-05-13 08:28:16 +02:00
Thomas Lübking d2f9d8feee validate screen and max'd state on packing windows
REVIEW: 110054
BUG: 304506
FIXED-IN: 4.11
2013-04-28 17:39:16 +02:00
Martin Gräßlin 0fb27fd12e Defines to create the boilerplate code for KWin's singleton classes
The define KWIN_SINGLETON adds to a class definition:

public:
    static Foo *create(QObject *parent = 0);
    static Foo *self() { return s_self; }
protected:
    explicit Foo(QObject *parent = 0);
private:
    static Foo *s_self;

There is an additional define KWIN_SINGLETON_VARIABLE to set a different
name than s_self.

The define KWIN_SINGLETON_FACTORY can be used to generate the create
method. It expands to:

Foo *Foo::s_self = 0;
Foo *Foo::create(QObject *parent)
{
    Q_ASSERT(!s_self);
    s_self = new Foo(parent);
    return s_self;
}

In addition there are defines to again set a different variable name and
to create an object of another inheriting class.

All the classes currently using this pattern are adjusted to use these
new defines. In a few places the name was adjusted. E.g. in Compositor
the factory method was called createCompositor instead of create.

REVIEW: 109865
2013-04-15 09:57:25 +02:00
Thomas Lübking 769955dfb8 ignore non current tabbed and on different activities clients
BUG: 313379
REVIEW: 108932
FIXED-IN: 4.11
2013-02-18 21:55:14 +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 f689df14d5 Remove Placement wrappers from Workspace
The two methods:
* place
* placeSmart
have only forwarded the call to the Placement object. Now that Placement
is a singleton there is no need to have them. Every user can call them
directly without going over Workspace.
2012-12-20 07:19:53 +01:00
Martin Gräßlin 835648bc20 Move cascadeDesktop and unclutterDesktop to Placement
It is more Placement related and does not really fit into geometry given
that it only calls methods on Placement. It probably only was inside
Workspace due to being part of the DBus interface. The DBus methods are
used by external components so it needs to stay.

The DBus Wrapper is now calling the methods on the singleton Placement
directly, so no need in Workspace anymore.
2012-12-20 07:19:53 +01:00
Martin Gräßlin 607e175b4b Make Placement a Singleton
No real change as there has only been one Placement instance inside
Workspace anyway.
2012-12-20 07:19:53 +01: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
Thomas Lübking 0f2bde11b0 allow "under mouse" as regular placement strategy
BUG: 272162
REVIEW: 104650
2012-04-20 23:59:36 +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
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 0b1599680d stage one, call martin 2011-03-08 22:05:09 +01:00
Martin Gräßlin e1c04b7c3e Add shortcuts for new quick tile modes.
Shortcuts for quick tile to the quarters of the screen
added in 4.6.
Thanks to Arthur Arlt for implementing this feature.
FEATURE: 265461
FIXED-IN: 4.7.0
CCMAIL: arre2000@gmx.de
2011-02-07 19:19:51 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Lucas Murray ae3ef3f765 Allow the quick tiling keyboard shortcuts to move the window between
Xinerama screens.

svn path=/trunk/KDE/kdebase/workspace/; revision=1065319
2009-12-23 01:36:44 +00:00
Robin Harold Burchell 102ec081e2 Extend on the quicktiling(/snap) work by mgraesslin in r1021305:
- Add hotkeys for snap left/snap right, kwin won't need a seperate hotkey for snap up, as maximize will do that job for us, and it already has a hotkey
 - Add geometry restoring to quick tile, meaning that windows can be moved back to their original state after a tile, useful if just looking at something quickly.

Thanks to mgraesslin for review and lots of mentoring.

svn path=/trunk/KDE/kdebase/workspace/; revision=1022987
2009-09-13 17:09:44 +00:00
Rick Xing 4975618a22 add brace to avoid compiling warning of gcc
svn path=/trunk/KDE/kdebase/workspace/; revision=894172
2008-12-08 03:49:44 +00:00
Laurent Montel 5535a9de5e Fix iterator
svn path=/trunk/KDE/kdebase/workspace/; revision=883047
2008-11-11 23:09:11 +00:00
Luboš Luňák 01bf6cbb4c License cleanup - add headers where missing, be explicit about GPL
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=742302
2007-11-27 19:40:25 +00:00
Andreas Pakulat 39e322fc83 Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are
needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdebase/workspace/; revision=721704
2007-10-05 22:21:25 +00:00
Luboš Luňák 47232a2c17 Support _NET_WM_FULL_PLACEMENT.
svn path=/trunk/KDE/kdebase/workspace/; revision=662075
2007-05-07 12:37:12 +00:00
Luboš Luňák f52b8e48cd branches/work/kwin_composite becomes new trunk kwin.
svn path=/trunk/KDE/kdebase/workspace/; revision=659202
2007-04-29 17:35:43 +00:00
Luboš Luňák 2b7e1f4993 Remove kwin, kwin_composite will become new trunk kwin, missing merges
from trunk will be merged in.


svn path=/trunk/KDE/kdebase/workspace/; revision=659200
2007-04-29 17:34:49 +00:00
Luboš Luňák 2c928221a4 namespace KWinInternal -> KWin - shorter typing of names in gdb, yay
svn path=/trunk/KDE/kdebase/workspace/; revision=650773
2007-04-05 12:12:10 +00:00
Luboš Luňák e3b865cd5f namespace KWinInternal -> KWin - shorter typing of names in gdb, yay
svn path=/branches/work/kwin_composite/; revision=650770
2007-04-05 12:07:35 +00:00