2007-11-27 19:40:25 +00:00
|
|
|
/********************************************************************
|
2007-04-29 17:35:43 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|
|
|
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
|
2009-02-14 15:40:52 +00:00
|
|
|
Copyright (C) 2009 Lucas Murray <lmurray@undefinedfire.com>
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2007-11-27 19:40:25 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
#ifndef KWIN_WORKSPACE_H
|
|
|
|
#define KWIN_WORKSPACE_H
|
|
|
|
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QVector>
|
|
|
|
#include <kshortcut.h>
|
|
|
|
#include <QCursor>
|
|
|
|
#include <netwm.h>
|
|
|
|
#include <kxmessages.h>
|
2011-08-29 04:47:07 +00:00
|
|
|
#include <QElapsedTimer>
|
2007-04-29 17:35:43 +00:00
|
|
|
#include <kmanagerselection.h>
|
|
|
|
|
2012-02-26 10:38:16 +00:00
|
|
|
// need to include utils.h before we use the ifdefs
|
|
|
|
#include "utils.h"
|
|
|
|
#ifdef KWIN_BUILD_ACTIVITIES
|
2011-12-05 14:33:14 +00:00
|
|
|
#include <KActivities/Controller>
|
2012-02-26 10:38:16 +00:00
|
|
|
#endif
|
2010-05-11 20:30:20 +00:00
|
|
|
|
2008-10-17 10:30:43 +00:00
|
|
|
#include "plugins.h"
|
2007-04-29 17:35:43 +00:00
|
|
|
#include "kdecoration.h"
|
2008-10-17 10:30:43 +00:00
|
|
|
#include "kdecorationfactory.h"
|
2011-07-07 16:29:11 +00:00
|
|
|
#ifdef KWIN_BUILD_SCREENEDGES
|
2011-06-23 10:51:43 +00:00
|
|
|
#include "screenedge.h"
|
2011-07-07 16:29:11 +00:00
|
|
|
#endif
|
2007-04-29 17:35:43 +00:00
|
|
|
#include "sm.h"
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
// TODO: Cleanup the order of things in this .h file
|
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
class QMenu;
|
2010-03-20 13:58:19 +00:00
|
|
|
class QActionGroup;
|
2010-09-24 12:03:22 +00:00
|
|
|
class QStringList;
|
2007-04-29 17:35:43 +00:00
|
|
|
class KConfig;
|
|
|
|
class KActionCollection;
|
|
|
|
class KStartupInfo;
|
|
|
|
class KStartupInfoId;
|
|
|
|
class KStartupInfoData;
|
|
|
|
class QSlider;
|
|
|
|
class QPushButton;
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2011-06-30 11:02:30 +00:00
|
|
|
#ifdef KWIN_BUILD_TABBOX
|
2009-09-13 11:36:45 +00:00
|
|
|
namespace TabBox
|
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
class TabBox;
|
2009-09-13 11:36:45 +00:00
|
|
|
}
|
2011-06-30 11:02:30 +00:00
|
|
|
#endif
|
2009-09-13 11:36:45 +00:00
|
|
|
|
|
|
|
class Client;
|
2011-07-20 11:25:00 +00:00
|
|
|
#ifdef KWIN_BUILD_TILING
|
2010-04-25 16:43:14 +00:00
|
|
|
class Tile;
|
2011-07-13 16:48:56 +00:00
|
|
|
class Tiling;
|
2010-04-25 16:43:14 +00:00
|
|
|
class TilingLayout;
|
2011-07-20 11:25:00 +00:00
|
|
|
#endif
|
2011-04-28 09:16:27 +00:00
|
|
|
class Outline;
|
2007-04-29 17:35:43 +00:00
|
|
|
class RootInfo;
|
|
|
|
class PluginMgr;
|
|
|
|
class Placement;
|
|
|
|
class Rules;
|
2012-04-12 13:19:38 +00:00
|
|
|
class Scripting;
|
2007-04-29 17:35:43 +00:00
|
|
|
class WindowRules;
|
|
|
|
|
|
|
|
class Workspace : public QObject, public KDecorationDefines
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
Q_OBJECT
|
2011-01-30 14:34:42 +00:00
|
|
|
public:
|
|
|
|
Workspace(bool restore = false);
|
|
|
|
virtual ~Workspace();
|
|
|
|
|
|
|
|
static Workspace* self() {
|
|
|
|
return _self;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool workspaceEvent(XEvent*);
|
|
|
|
bool workspaceEvent(QEvent*);
|
|
|
|
|
|
|
|
KDecoration* createDecoration(KDecorationBridge* bridge);
|
2011-04-28 13:56:50 +00:00
|
|
|
bool hasDecorationPlugin() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
bool hasClient(const Client*);
|
|
|
|
|
|
|
|
template<typename T> Client* findClient(T predicate) const;
|
|
|
|
template<typename T1, typename T2> void forEachClient(T1 procedure, T2 predicate);
|
|
|
|
template<typename T> void forEachClient(T procedure);
|
|
|
|
template<typename T> Unmanaged* findUnmanaged(T predicate) const;
|
|
|
|
template<typename T1, typename T2> void forEachUnmanaged(T1 procedure, T2 predicate);
|
|
|
|
template<typename T> void forEachUnmanaged(T procedure);
|
|
|
|
|
|
|
|
QRect clientArea(clientAreaOption, const QPoint& p, int desktop) const;
|
|
|
|
QRect clientArea(clientAreaOption, const Client* c) const;
|
|
|
|
QRect clientArea(clientAreaOption, int screen, int desktop) const;
|
|
|
|
|
|
|
|
QRegion restrictedMoveArea(int desktop, StrutAreas areas = StrutAreaAll) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
void killWindowId(Window window);
|
|
|
|
|
|
|
|
void killWindow() {
|
|
|
|
slotKillWindow();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool initializing() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the active client, i.e. the client that has the focus (or None
|
|
|
|
* if no client has the focus)
|
|
|
|
*/
|
|
|
|
Client* activeClient() const;
|
|
|
|
/**
|
|
|
|
* Client that was activated, but it's not yet really activeClient(), because
|
|
|
|
* we didn't process yet the matching FocusIn event. Used mostly in focus
|
|
|
|
* stealing prevention code.
|
|
|
|
*/
|
|
|
|
Client* mostRecentlyActivatedClient() const;
|
|
|
|
|
2012-02-13 22:50:49 +00:00
|
|
|
Client* clientUnderMouse(int screen) const;
|
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
void activateClient(Client*, bool force = false);
|
|
|
|
void requestFocus(Client* c, bool force = false);
|
|
|
|
void takeActivity(Client* c, int flags, bool handled); // Flags are ActivityFlags
|
|
|
|
void handleTakeActivity(Client* c, Time timestamp, int flags); // Flags are ActivityFlags
|
|
|
|
bool allowClientActivation(const Client* c, Time time = -1U, bool focus_in = false,
|
|
|
|
bool ignore_desktop = false);
|
|
|
|
void restoreFocus();
|
|
|
|
void gotFocusIn(const Client*);
|
|
|
|
void setShouldGetFocus(Client*);
|
|
|
|
bool activateNextClient(Client* c);
|
|
|
|
bool focusChangeEnabled() {
|
|
|
|
return block_focus == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateColormap();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that the client c is being moved around by the user.
|
|
|
|
*/
|
|
|
|
void setClientIsMoving(Client* c);
|
|
|
|
|
|
|
|
void place(Client* c, QRect& area);
|
|
|
|
void placeSmart(Client* c, const QRect& area);
|
|
|
|
|
|
|
|
QPoint adjustClientPosition(Client* c, QPoint pos, bool unrestricted, double snapAdjust = 1.0);
|
|
|
|
QRect adjustClientSize(Client* c, QRect moveResizeGeom, int mode);
|
|
|
|
void raiseClient(Client* c, bool nogroup = false);
|
|
|
|
void lowerClient(Client* c, bool nogroup = false);
|
|
|
|
void raiseClientRequest(Client* c, NET::RequestSource src, Time timestamp);
|
|
|
|
void lowerClientRequest(Client* c, NET::RequestSource src, Time timestamp);
|
|
|
|
void restackClientUnderActive(Client*);
|
|
|
|
void restack(Client *c, Client *under);
|
|
|
|
void updateClientLayer(Client* c);
|
|
|
|
void raiseOrLowerClient(Client*);
|
|
|
|
void resetUpdateToolWindowsTimer();
|
|
|
|
void restoreSessionStackingOrder(Client* c);
|
|
|
|
void updateStackingOrder(bool propagate_new_clients = false);
|
|
|
|
void forceRestacking();
|
|
|
|
|
|
|
|
void clientHidden(Client*);
|
|
|
|
void clientAttentionChanged(Client* c, bool set);
|
|
|
|
|
2011-02-27 08:25:45 +00:00
|
|
|
/**
|
|
|
|
* @return List of clients currently managed by Workspace
|
|
|
|
**/
|
|
|
|
const ClientList &clientList() const {
|
|
|
|
return clients;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return List of unmanaged "clients" currently registered in Workspace
|
|
|
|
**/
|
|
|
|
const UnmanagedList &unmanagedList() const {
|
|
|
|
return unmanaged;
|
|
|
|
}
|
|
|
|
|
2011-07-20 11:25:00 +00:00
|
|
|
#ifdef KWIN_BUILD_TILING
|
2011-07-13 16:48:56 +00:00
|
|
|
Tiling* tiling();
|
2011-07-20 11:25:00 +00:00
|
|
|
#endif
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2011-04-28 09:16:27 +00:00
|
|
|
Outline* outline();
|
2011-07-07 16:29:11 +00:00
|
|
|
#ifdef KWIN_BUILD_SCREENEDGES
|
2011-06-23 10:51:43 +00:00
|
|
|
ScreenEdge* screenEdge();
|
2011-07-07 16:29:11 +00:00
|
|
|
#endif
|
2011-04-28 09:16:27 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
//-------------------------------------------------
|
|
|
|
// Desktop layout
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @returns Total number of desktops currently in existence.
|
|
|
|
*/
|
|
|
|
int numberOfDesktops() const;
|
2012-04-29 15:32:34 +00:00
|
|
|
/**
|
|
|
|
* @returns The maximum number of desktops that KWin supports.
|
|
|
|
*/
|
|
|
|
int maxNumberOfDesktops() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
/**
|
|
|
|
* Set the number of available desktops to @a count. This function overrides any previous
|
|
|
|
* grid layout.
|
|
|
|
*/
|
|
|
|
void setNumberOfDesktops(int count);
|
|
|
|
/**
|
|
|
|
* Called from within setNumberOfDesktops() to ensure the desktop layout is still valid.
|
|
|
|
*/
|
|
|
|
void updateDesktopLayout();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns The size of desktop layout in grid units.
|
|
|
|
*/
|
|
|
|
QSize desktopGridSize() const;
|
|
|
|
/**
|
|
|
|
* @returns The width of desktop layout in grid units.
|
|
|
|
*/
|
|
|
|
int desktopGridWidth() const;
|
|
|
|
/**
|
|
|
|
* @returns The height of desktop layout in grid units.
|
|
|
|
*/
|
|
|
|
int desktopGridHeight() const;
|
|
|
|
/**
|
|
|
|
* @returns The width of desktop layout in pixels. Equivalent to gridWidth() *
|
|
|
|
* ::displayWidth().
|
|
|
|
*/
|
|
|
|
int workspaceWidth() const;
|
|
|
|
/**
|
|
|
|
* @returns The height of desktop layout in pixels. Equivalent to gridHeight() *
|
|
|
|
* ::displayHeight().
|
|
|
|
*/
|
|
|
|
int workspaceHeight() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns The ID of the current desktop.
|
|
|
|
*/
|
|
|
|
int currentDesktop() const;
|
|
|
|
/**
|
|
|
|
* Set the current desktop to @a current.
|
|
|
|
* @returns True on success, false otherwise.
|
|
|
|
*/
|
|
|
|
bool setCurrentDesktop(int current);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate a desktop layout from EWMH _NET_DESKTOP_LAYOUT property parameters.
|
|
|
|
*/
|
|
|
|
void setNETDesktopLayout(Qt::Orientation orientation, int width, int height, int startingCorner);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns The ID of the desktop at the point @a coords or 0 if no desktop exists at that
|
|
|
|
* point. @a coords is to be in grid units.
|
|
|
|
*/
|
|
|
|
int desktopAtCoords(QPoint coords) const;
|
|
|
|
/**
|
|
|
|
* @returns The coords of desktop @a id in grid units.
|
|
|
|
*/
|
|
|
|
QPoint desktopGridCoords(int id) const;
|
|
|
|
/**
|
|
|
|
* @returns The coords of the top-left corner of desktop @a id in pixels.
|
|
|
|
*/
|
|
|
|
QPoint desktopCoords(int id) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns The ID of the desktop above desktop @a id. Wraps around to the bottom of
|
|
|
|
* the layout if @a wrap is set. If @a id is not set use the current one.
|
|
|
|
*/
|
|
|
|
int desktopAbove(int id = 0, bool wrap = true) const;
|
|
|
|
/**
|
|
|
|
* @returns The ID of the desktop to the right of desktop @a id. Wraps around to the
|
|
|
|
* left of the layout if @a wrap is set. If @a id is not set use the current one.
|
|
|
|
*/
|
|
|
|
int desktopToRight(int id = 0, bool wrap = true) const;
|
|
|
|
/**
|
|
|
|
* @returns The ID of the desktop below desktop @a id. Wraps around to the top of the
|
|
|
|
* layout if @a wrap is set. If @a id is not set use the current one.
|
|
|
|
*/
|
|
|
|
int desktopBelow(int id = 0, bool wrap = true) const;
|
|
|
|
/**
|
|
|
|
* @returns The ID of the desktop to the left of desktop @a id. Wraps around to the
|
|
|
|
* right of the layout if @a wrap is set. If @a id is not set use the current one.
|
|
|
|
*/
|
|
|
|
int desktopToLeft(int id = 0, bool wrap = true) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int desktopCount_;
|
|
|
|
QSize desktopGridSize_;
|
|
|
|
int* desktopGrid_;
|
|
|
|
int currentDesktop_;
|
|
|
|
QString activity_;
|
2012-04-12 19:52:44 +00:00
|
|
|
QStringList allActivities_, openActivities_;
|
2012-02-26 10:38:16 +00:00
|
|
|
#ifdef KWIN_BUILD_ACTIVITIES
|
2011-11-04 22:23:52 +00:00
|
|
|
KActivities::Controller activityController_;
|
2012-02-26 10:38:16 +00:00
|
|
|
#endif
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2011-07-20 11:25:00 +00:00
|
|
|
#ifdef KWIN_BUILD_TILING
|
2011-07-13 16:48:56 +00:00
|
|
|
Tiling* m_tiling;
|
2011-07-20 11:25:00 +00:00
|
|
|
#endif
|
2011-04-28 09:16:27 +00:00
|
|
|
Outline* m_outline;
|
2011-07-07 16:29:11 +00:00
|
|
|
#ifdef KWIN_BUILD_SCREENEDGES
|
2011-06-23 10:51:43 +00:00
|
|
|
ScreenEdge m_screenEdge;
|
2012-05-03 17:48:20 +00:00
|
|
|
Qt::Orientations m_screenEdgeOrientation;
|
2011-07-07 16:29:11 +00:00
|
|
|
#endif
|
2011-04-28 09:16:27 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
//-------------------------------------------------
|
|
|
|
// Unsorted
|
|
|
|
|
|
|
|
public:
|
|
|
|
int activeScreen() const;
|
|
|
|
int numScreens() const;
|
|
|
|
void checkActiveScreen(const Client* c);
|
|
|
|
void setActiveScreenMouse(const QPoint& mousepos);
|
|
|
|
QRect screenGeometry(int screen) const;
|
|
|
|
int screenNumber(const QPoint& pos) const;
|
|
|
|
QString currentActivity() const {
|
|
|
|
return activity_;
|
|
|
|
}
|
|
|
|
QStringList activityList() const {
|
|
|
|
return allActivities_;
|
|
|
|
}
|
2011-09-30 11:22:39 +00:00
|
|
|
// True when performing Workspace::updateClientArea().
|
|
|
|
// The calls below are valid only in that case.
|
|
|
|
bool inUpdateClientArea() const;
|
|
|
|
QRegion previousRestrictedMoveArea(int desktop, StrutAreas areas = StrutAreaAll) const;
|
|
|
|
QVector< QRect > previousScreenSizes() const;
|
2011-09-30 12:50:18 +00:00
|
|
|
int oldDisplayWidth() const;
|
|
|
|
int oldDisplayHeight() const;
|
2011-09-30 11:22:39 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
// Tab box
|
2011-06-30 11:02:30 +00:00
|
|
|
#ifdef KWIN_BUILD_TABBOX
|
|
|
|
TabBox::TabBox *tabBox() const;
|
|
|
|
#endif
|
|
|
|
bool hasTabBox() const;
|
|
|
|
|
2011-06-25 16:05:07 +00:00
|
|
|
const QVector<int> &desktopFocusChain() const {
|
2012-05-01 16:34:38 +00:00
|
|
|
return m_desktopFocusChain.value();
|
2011-06-25 16:05:07 +00:00
|
|
|
}
|
|
|
|
const ClientList &globalFocusChain() const {
|
|
|
|
return global_focus_chain;
|
|
|
|
}
|
|
|
|
KActionCollection* actionCollection() const {
|
|
|
|
return keys;
|
|
|
|
}
|
|
|
|
KActionCollection* disableShortcutsKeys() const {
|
|
|
|
return disable_shortcuts_keys;
|
|
|
|
}
|
|
|
|
KActionCollection* clientKeys() const {
|
|
|
|
return client_keys;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the list of clients sorted in stacking order, with topmost client
|
|
|
|
* at the last position
|
|
|
|
*/
|
2012-04-08 08:07:35 +00:00
|
|
|
const ToplevelList& stackingOrder() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
ToplevelList xStackingOrder() const;
|
|
|
|
ClientList ensureStackingOrder(const ClientList& clients) const;
|
|
|
|
|
|
|
|
Client* topClientOnDesktop(int desktop, int screen, bool unconstrained = false,
|
|
|
|
bool only_normal = true) const;
|
|
|
|
Client* findDesktop(bool topmost, int desktop) const;
|
|
|
|
void sendClientToDesktop(Client* c, int desktop, bool dont_activate);
|
|
|
|
void toggleClientOnActivity(Client* c, const QString &activity, bool dont_activate);
|
|
|
|
void windowToPreviousDesktop(Client* c);
|
|
|
|
void windowToNextDesktop(Client* c);
|
|
|
|
void sendClientToScreen(Client* c, int screen);
|
|
|
|
|
|
|
|
// KDE4 remove me - And it's also in the DCOP interface :(
|
|
|
|
void showWindowMenuAt(unsigned long id, int x, int y);
|
|
|
|
|
|
|
|
void toggleCompositing();
|
|
|
|
void loadEffect(const QString& name);
|
|
|
|
void toggleEffect(const QString& name);
|
|
|
|
void reconfigureEffect(const QString& name);
|
|
|
|
void unloadEffect(const QString& name);
|
2012-08-11 09:24:37 +00:00
|
|
|
QString supportInformationForEffect(const QString& name) const;
|
2011-03-20 14:42:05 +00:00
|
|
|
void updateCompositeBlocking(Client* c = NULL);
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
QStringList loadedEffects() const;
|
|
|
|
QStringList listOfEffects() const;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shows the menu operations menu for the client and makes it active if
|
|
|
|
* it's not already.
|
|
|
|
*/
|
|
|
|
void showWindowMenu(const QRect& pos, Client* cl);
|
|
|
|
/**
|
|
|
|
* Backwards compatibility.
|
|
|
|
*/
|
|
|
|
void showWindowMenu(int x, int y, Client* cl);
|
|
|
|
void showWindowMenu(QPoint pos, Client* cl);
|
2012-04-16 16:16:38 +00:00
|
|
|
bool windowMenuShown();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
void updateMinimizedOfTransients(Client*);
|
|
|
|
void updateOnAllDesktopsOfTransients(Client*);
|
|
|
|
void updateOnAllActivitiesOfTransients(Client*);
|
|
|
|
void checkTransients(Window w);
|
|
|
|
|
|
|
|
void performWindowOperation(Client* c, WindowOperation op);
|
|
|
|
|
|
|
|
void storeSession(KConfig* config, SMSavePhase phase);
|
|
|
|
void storeClient(KConfigGroup &cg, int num, Client *c);
|
|
|
|
void storeSubSession(const QString &name, QSet<QByteArray> sessionIds);
|
|
|
|
|
|
|
|
SessionInfo* takeSessionInfo(Client*);
|
|
|
|
WindowRules findWindowRules(const Client*, bool);
|
|
|
|
void rulesUpdated();
|
|
|
|
void discardUsedWindowRules(Client* c, bool withdraw);
|
|
|
|
void disableRulesUpdates(bool disable);
|
|
|
|
bool rulesUpdatesDisabled() const;
|
|
|
|
|
|
|
|
bool hasDecorationShadows() const;
|
2011-04-25 15:04:04 +00:00
|
|
|
Qt::Corner decorationCloseButtonCorner();
|
2011-01-30 14:34:42 +00:00
|
|
|
bool decorationHasAlpha() const;
|
2012-01-12 06:42:55 +00:00
|
|
|
bool decorationSupportsTabbing() const; // Returns true if the decoration supports tabs.
|
2011-01-30 14:34:42 +00:00
|
|
|
bool decorationSupportsFrameOverlap() const;
|
|
|
|
bool decorationSupportsBlurBehind() const;
|
|
|
|
|
|
|
|
// D-Bus interface
|
|
|
|
void cascadeDesktop();
|
|
|
|
void unclutterDesktop();
|
|
|
|
void doNotManage(const QString&);
|
|
|
|
QList<int> decorationSupportedColors() const;
|
|
|
|
void nextDesktop();
|
|
|
|
void previousDesktop();
|
|
|
|
void circulateDesktopApplications();
|
|
|
|
bool compositingActive();
|
|
|
|
bool waitForCompositingSetup();
|
|
|
|
void toggleTiling();
|
|
|
|
void nextTileLayout();
|
|
|
|
void previousTileLayout();
|
|
|
|
bool stopActivity(const QString &id);
|
|
|
|
bool startActivity(const QString &id);
|
2011-12-29 22:33:45 +00:00
|
|
|
QStringList activeEffects() const;
|
2012-03-04 14:13:22 +00:00
|
|
|
QString supportInformation() const;
|
2012-04-27 09:03:26 +00:00
|
|
|
bool compositingPossible() const;
|
|
|
|
QString compositingNotPossibleReason() const;
|
|
|
|
bool openGLIsBroken() const;
|
2012-05-04 09:13:24 +00:00
|
|
|
/**
|
|
|
|
* Returns the currently used Compositor (Scene):
|
|
|
|
* @li @c none No Compositing
|
|
|
|
* @li @c xrender XRender
|
|
|
|
* @li @c gl1 OpenGL 1
|
|
|
|
* @li @c gl2 OpenGL 2
|
|
|
|
* @li @c gles OpenGL ES 2
|
|
|
|
**/
|
|
|
|
QString compositingType();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
void setCurrentScreen(int new_screen);
|
|
|
|
|
|
|
|
QString desktopName(int desk) const;
|
|
|
|
void setShowingDesktop(bool showing);
|
|
|
|
void resetShowingDesktop(bool keep_hidden);
|
|
|
|
bool showingDesktop() const;
|
|
|
|
|
|
|
|
bool isNotManaged(const QString& title); // TODO: Setter or getter?
|
|
|
|
|
|
|
|
void sendPingToWindow(Window w, Time timestamp); // Called from Client::pingWindow()
|
|
|
|
void sendTakeActivity(Client* c, Time timestamp, long flags); // Called from Client::takeActivity()
|
|
|
|
|
|
|
|
void removeClient(Client*, allowed_t); // Only called from Client::destroyClient() or Client::releaseWindow()
|
|
|
|
void setActiveClient(Client*, allowed_t);
|
|
|
|
Group* findGroup(Window leader) const;
|
|
|
|
void addGroup(Group* group, allowed_t);
|
|
|
|
void removeGroup(Group* group, allowed_t);
|
|
|
|
Group* findClientLeaderGroup(const Client* c) const;
|
|
|
|
|
|
|
|
void removeUnmanaged(Unmanaged*, allowed_t); // Only called from Unmanaged::release()
|
|
|
|
void removeDeleted(Deleted*, allowed_t);
|
2012-04-09 09:06:44 +00:00
|
|
|
void addDeleted(Deleted*, Toplevel*, allowed_t);
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
bool checkStartupNotification(Window w, KStartupInfoId& id, KStartupInfoData& data);
|
|
|
|
|
|
|
|
void focusToNull(); // SELI TODO: Public?
|
|
|
|
enum FocusChainChange {
|
|
|
|
FocusChainMakeFirst,
|
|
|
|
FocusChainMakeLast,
|
|
|
|
FocusChainUpdate
|
|
|
|
};
|
|
|
|
void updateFocusChains(Client* c, FocusChainChange change);
|
|
|
|
|
|
|
|
bool forcedGlobalMouseGrab() const;
|
|
|
|
void clientShortcutUpdated(Client* c);
|
|
|
|
bool shortcutAvailable(const KShortcut& cut, Client* ignore = NULL) const;
|
|
|
|
bool globalShortcutsDisabled() const;
|
|
|
|
void disableGlobalShortcuts(bool disable);
|
|
|
|
void disableGlobalShortcutsForClient(bool disable);
|
|
|
|
QPoint cursorPos() const;
|
|
|
|
|
|
|
|
void sessionSaveStarted();
|
|
|
|
void sessionSaveDone();
|
|
|
|
void setWasUserInteraction();
|
|
|
|
bool wasUserInteraction() const;
|
|
|
|
bool sessionSaving() const;
|
|
|
|
|
|
|
|
int packPositionLeft(const Client* cl, int oldx, bool left_edge) const;
|
|
|
|
int packPositionRight(const Client* cl, int oldx, bool right_edge) const;
|
|
|
|
int packPositionUp(const Client* cl, int oldy, bool top_edge) const;
|
|
|
|
int packPositionDown(const Client* cl, int oldy, bool bottom_edge) const;
|
|
|
|
|
|
|
|
static QStringList configModules(bool controlCenter);
|
|
|
|
|
|
|
|
void cancelDelayFocus();
|
|
|
|
void requestDelayFocus(Client*);
|
|
|
|
void updateFocusMousePosition(const QPoint& pos);
|
|
|
|
QPoint focusMousePosition() const;
|
|
|
|
|
|
|
|
void toggleTopDockShadows(bool on);
|
|
|
|
|
|
|
|
// when adding repaints caused by a window, you probably want to use
|
|
|
|
// either Toplevel::addRepaint() or Toplevel::addWorkspaceRepaint()
|
|
|
|
void addRepaint(const QRect& r);
|
|
|
|
void addRepaint(const QRegion& r);
|
|
|
|
void addRepaint(int x, int y, int w, int h);
|
|
|
|
void checkUnredirect(bool force = false);
|
|
|
|
void checkCompositeTimer();
|
2012-03-29 20:11:28 +00:00
|
|
|
// returns the _estimated_ delay to the next screen update
|
|
|
|
// good for having a rough idea to calculate transformations, bad to rely on.
|
|
|
|
// might happen few ms earlier, might be an entire frame to short. This is NOT deterministic.
|
|
|
|
int nextFrameDelay();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
// Mouse polling
|
|
|
|
void startMousePolling();
|
|
|
|
void stopMousePolling();
|
|
|
|
|
2011-06-23 10:09:17 +00:00
|
|
|
Client* getMovingClient() {
|
|
|
|
return movingClient;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void addRepaintFull();
|
|
|
|
|
|
|
|
// Keybindings
|
|
|
|
void slotSwitchDesktopNext();
|
|
|
|
void slotSwitchDesktopPrevious();
|
|
|
|
void slotSwitchDesktopRight();
|
|
|
|
void slotSwitchDesktopLeft();
|
|
|
|
void slotSwitchDesktopUp();
|
|
|
|
void slotSwitchDesktopDown();
|
|
|
|
|
2011-02-16 18:23:54 +00:00
|
|
|
void slotSwitchToDesktop();
|
2011-01-30 14:34:42 +00:00
|
|
|
//void slotSwitchToWindow( int );
|
2011-02-16 18:23:54 +00:00
|
|
|
void slotWindowToDesktop();
|
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
//void slotWindowToListPosition( int );
|
2011-02-16 18:23:54 +00:00
|
|
|
void slotSwitchToScreen();
|
|
|
|
void slotWindowToScreen();
|
2011-01-30 14:34:42 +00:00
|
|
|
void slotSwitchToNextScreen();
|
|
|
|
void slotWindowToNextScreen();
|
|
|
|
void slotToggleShowDesktop();
|
|
|
|
|
|
|
|
void slotWindowMaximize();
|
|
|
|
void slotWindowMaximizeVertical();
|
|
|
|
void slotWindowMaximizeHorizontal();
|
|
|
|
void slotWindowMinimize();
|
|
|
|
void slotWindowShade();
|
|
|
|
void slotWindowRaise();
|
|
|
|
void slotWindowLower();
|
|
|
|
void slotWindowRaiseOrLower();
|
|
|
|
void slotActivateAttentionWindow();
|
|
|
|
void slotWindowPackLeft();
|
|
|
|
void slotWindowPackRight();
|
|
|
|
void slotWindowPackUp();
|
|
|
|
void slotWindowPackDown();
|
|
|
|
void slotWindowGrowHorizontal();
|
|
|
|
void slotWindowGrowVertical();
|
|
|
|
void slotWindowShrinkHorizontal();
|
|
|
|
void slotWindowShrinkVertical();
|
|
|
|
void slotWindowQuickTileLeft();
|
|
|
|
void slotWindowQuickTileRight();
|
2011-02-07 18:19:51 +00:00
|
|
|
void slotWindowQuickTileTopLeft();
|
|
|
|
void slotWindowQuickTileTopRight();
|
|
|
|
void slotWindowQuickTileBottomLeft();
|
|
|
|
void slotWindowQuickTileBottomRight();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
void slotSwitchWindowUp();
|
|
|
|
void slotSwitchWindowDown();
|
|
|
|
void slotSwitchWindowRight();
|
|
|
|
void slotSwitchWindowLeft();
|
|
|
|
|
2011-08-19 19:53:30 +00:00
|
|
|
void slotIncreaseWindowOpacity();
|
|
|
|
void slotLowerWindowOpacity();
|
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
void slotWindowOperations();
|
|
|
|
void slotWindowClose();
|
|
|
|
void slotWindowMove();
|
|
|
|
void slotWindowResize();
|
|
|
|
void slotWindowAbove();
|
|
|
|
void slotWindowBelow();
|
|
|
|
void slotWindowOnAllDesktops();
|
|
|
|
void slotWindowFullScreen();
|
|
|
|
void slotWindowNoBorder();
|
|
|
|
|
|
|
|
void slotWindowToNextDesktop();
|
|
|
|
void slotWindowToPreviousDesktop();
|
|
|
|
void slotWindowToDesktopRight();
|
|
|
|
void slotWindowToDesktopLeft();
|
|
|
|
void slotWindowToDesktopUp();
|
|
|
|
void slotWindowToDesktopDown();
|
|
|
|
|
|
|
|
void slotDisableGlobalShortcuts();
|
|
|
|
|
|
|
|
void slotSettingsChanged(int category);
|
|
|
|
|
|
|
|
void reconfigure();
|
|
|
|
void slotReconfigure();
|
|
|
|
void slotReinitCompositing();
|
|
|
|
void resetCompositing();
|
|
|
|
|
|
|
|
void slotKillWindow();
|
|
|
|
|
|
|
|
void slotSetupWindowShortcut();
|
|
|
|
void setupWindowShortcutDone(bool);
|
|
|
|
void slotToggleCompositing();
|
2012-03-23 01:06:46 +00:00
|
|
|
void slotInvertScreen();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
void updateClientArea();
|
|
|
|
void suspendCompositing();
|
|
|
|
void suspendCompositing(bool suspend);
|
|
|
|
|
|
|
|
// NOTE: debug method
|
|
|
|
void dumpTiles() const;
|
|
|
|
|
2012-01-12 06:42:55 +00:00
|
|
|
void slotActivateNextTab(); // Slot to move left the active Client.
|
|
|
|
void slotActivatePrevTab(); // Slot to move right the active Client.
|
|
|
|
void slotUntab(); // Slot to remove the active client from its group.
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
private slots:
|
2012-01-12 06:42:55 +00:00
|
|
|
void rebuildTabGroupPopup();
|
|
|
|
void rebuildTabListPopup();
|
|
|
|
void entabPopupClient(QAction*);
|
|
|
|
void selectPopupClientTab(QAction*);
|
2011-01-30 14:34:42 +00:00
|
|
|
void desktopPopupAboutToShow();
|
|
|
|
void activityPopupAboutToShow();
|
|
|
|
void clientPopupAboutToShow();
|
|
|
|
void slotSendToDesktop(QAction*);
|
|
|
|
void slotToggleOnActivity(QAction*);
|
|
|
|
void clientPopupActivated(QAction*);
|
|
|
|
void configureWM();
|
|
|
|
void desktopResized();
|
2011-07-24 20:56:55 +00:00
|
|
|
void screenChangeTimeout();
|
2011-01-30 14:34:42 +00:00
|
|
|
void slotUpdateToolWindows();
|
|
|
|
void delayFocus();
|
|
|
|
void gotTemporaryRulesMessage(const QString&);
|
|
|
|
void cleanupTemporaryRules();
|
|
|
|
void writeWindowRules();
|
|
|
|
void slotBlockShortcuts(int data);
|
|
|
|
void slotReloadConfig();
|
|
|
|
void setupCompositing();
|
2012-04-13 07:12:13 +00:00
|
|
|
/**
|
|
|
|
* Called from setupCompositing() when the CompositingPrefs are ready.
|
|
|
|
**/
|
|
|
|
void slotCompositingOptionsInitialized();
|
2011-01-30 14:34:42 +00:00
|
|
|
void finishCompositing();
|
|
|
|
void fallbackToXRenderCompositing();
|
|
|
|
void performCompositing();
|
|
|
|
void performMousePoll();
|
|
|
|
void lostCMSelection();
|
|
|
|
void resetCursorPosTime();
|
|
|
|
void delayedCheckUnredirect();
|
|
|
|
void updateCurrentActivity(const QString &new_activity);
|
2012-06-21 18:37:23 +00:00
|
|
|
void slotActivityRemoved(const QString &activity);
|
|
|
|
void slotActivityAdded(const QString &activity);
|
2011-01-30 14:34:42 +00:00
|
|
|
void reallyStopActivity(const QString &id); //dbus deadlocks suck
|
2012-04-12 19:52:44 +00:00
|
|
|
void handleActivityReply();
|
|
|
|
void showHideActivityMenu();
|
2011-01-30 14:34:42 +00:00
|
|
|
protected:
|
|
|
|
void timerEvent(QTimerEvent *te);
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
Q_SCRIPTABLE void compositingToggled(bool active);
|
2012-04-13 09:27:50 +00:00
|
|
|
/**
|
|
|
|
* Emitted after the Workspace has setup the complete initialization process.
|
|
|
|
* This can be used to connect to for performing post-workspace initialization.
|
|
|
|
**/
|
|
|
|
void workspaceInitialized();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2010-09-21 14:31:40 +00:00
|
|
|
//Signals required for the scripting interface
|
2011-01-30 14:34:42 +00:00
|
|
|
signals:
|
|
|
|
void desktopPresenceChanged(KWin::Client*, int);
|
2012-05-02 19:16:16 +00:00
|
|
|
void currentDesktopChanged(int, KWin::Client*);
|
2011-03-06 19:10:11 +00:00
|
|
|
void numberDesktopsChanged(int oldNumberOfDesktops);
|
2011-01-30 14:34:42 +00:00
|
|
|
void clientAdded(KWin::Client*);
|
|
|
|
void clientRemoved(KWin::Client*);
|
|
|
|
void clientActivated(KWin::Client*);
|
2012-03-09 09:17:19 +00:00
|
|
|
void clientDemandsAttentionChanged(KWin::Client*, bool);
|
2011-01-30 14:34:42 +00:00
|
|
|
void groupAdded(KWin::Group*);
|
2011-02-25 21:06:02 +00:00
|
|
|
void unmanagedAdded(KWin::Unmanaged*);
|
2011-02-27 09:47:42 +00:00
|
|
|
void deletedRemoved(KWin::Deleted*);
|
2011-03-12 13:37:30 +00:00
|
|
|
void mouseChanged(const QPoint& pos, const QPoint& oldpos,
|
|
|
|
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
|
|
|
|
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
|
2011-03-12 18:18:19 +00:00
|
|
|
void propertyNotify(long a);
|
2011-07-13 09:36:49 +00:00
|
|
|
void configChanged();
|
2012-06-21 18:37:23 +00:00
|
|
|
/**
|
|
|
|
* This signal is emitted when the global
|
|
|
|
* activity is changed
|
|
|
|
* @param id id of the new current activity
|
|
|
|
*/
|
|
|
|
void currentActivityChanged(const QString &id);
|
|
|
|
/**
|
|
|
|
* This signal is emitted when a new activity is added
|
|
|
|
* @param id id of the new activity
|
|
|
|
*/
|
|
|
|
void activityAdded(const QString &id);
|
|
|
|
/**
|
|
|
|
* This signal is emitted when the activity
|
|
|
|
* is removed
|
|
|
|
* @param id id of the removed activity
|
|
|
|
*/
|
|
|
|
void activityRemoved(const QString &id);
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void init();
|
|
|
|
void initShortcuts();
|
|
|
|
void initDesktopPopup();
|
|
|
|
void initActivityPopup();
|
2012-01-12 06:42:55 +00:00
|
|
|
void initTabbingPopups();
|
2011-12-16 16:36:27 +00:00
|
|
|
void restartKWin(const QString &reason);
|
2011-01-30 14:34:42 +00:00
|
|
|
void discardPopup();
|
|
|
|
void setupWindowShortcut(Client* c);
|
|
|
|
void checkCursorPos();
|
2012-04-12 19:52:44 +00:00
|
|
|
#ifdef KWIN_BUILD_ACTIVITIES
|
|
|
|
void updateActivityList(bool running, bool updateCurrent, QString slot = QString());
|
|
|
|
#endif
|
2011-01-30 14:34:42 +00:00
|
|
|
enum Direction {
|
|
|
|
DirectionNorth,
|
|
|
|
DirectionEast,
|
|
|
|
DirectionSouth,
|
|
|
|
DirectionWest
|
2007-04-29 17:35:43 +00:00
|
|
|
};
|
2011-01-30 14:34:42 +00:00
|
|
|
void switchWindow(Direction direction);
|
|
|
|
|
|
|
|
void propagateClients(bool propagate_new_clients); // Called only from updateStackingOrder
|
2012-04-07 15:29:22 +00:00
|
|
|
ToplevelList constrainedStackingOrder();
|
2011-01-30 14:34:42 +00:00
|
|
|
void raiseClientWithinApplication(Client* c);
|
|
|
|
void lowerClientWithinApplication(Client* c);
|
|
|
|
bool allowFullClientRaising(const Client* c, Time timestamp);
|
|
|
|
bool keepTransientAbove(const Client* mainwindow, const Client* transient);
|
|
|
|
void blockStackingUpdates(bool block);
|
|
|
|
void updateToolWindows(bool also_hide);
|
|
|
|
void fixPositionAfterCrash(Window w, const XWindowAttributes& attr);
|
2011-09-30 11:22:39 +00:00
|
|
|
void saveOldScreenSizes();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/// This is the right way to create a new client
|
|
|
|
Client* createClient(Window w, bool is_mapped);
|
|
|
|
void addClient(Client* c, allowed_t);
|
|
|
|
Unmanaged* createUnmanaged(Window w);
|
|
|
|
void addUnmanaged(Unmanaged* c, allowed_t);
|
|
|
|
|
|
|
|
Window findSpecialEventWindow(XEvent* e);
|
|
|
|
|
|
|
|
void randomPlacement(Client* c);
|
|
|
|
void smartPlacement(Client* c);
|
|
|
|
void cascadePlacement(Client* c, bool re_init = false);
|
|
|
|
|
|
|
|
// Desktop names and number of desktops
|
|
|
|
void loadDesktopSettings();
|
|
|
|
void saveDesktopSettings();
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
|
|
|
|
void helperDialog(const QString& message, const Client* c);
|
|
|
|
|
|
|
|
QMenu* clientPopup();
|
|
|
|
void closeActivePopup();
|
|
|
|
void updateClientArea(bool force);
|
|
|
|
|
|
|
|
bool windowRepaintsPending() const;
|
|
|
|
void setCompositeTimer();
|
2012-03-29 20:11:28 +00:00
|
|
|
int m_timeSinceLastVBlank, m_nextFrameDelay;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-05-01 16:34:38 +00:00
|
|
|
typedef QHash< QString, QVector<int> > DesktopFocusChains;
|
|
|
|
DesktopFocusChains::Iterator m_desktopFocusChain;
|
|
|
|
DesktopFocusChains m_activitiesDesktopFocusChain;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
QWidget* active_popup;
|
|
|
|
Client* active_popup_client;
|
|
|
|
|
|
|
|
void loadSessionInfo();
|
|
|
|
void addSessionInfo(KConfigGroup &cg);
|
|
|
|
void loadSubSessionInfo(const QString &name);
|
|
|
|
|
|
|
|
void loadWindowRules();
|
|
|
|
void editWindowRules(Client* c, bool whole_app);
|
|
|
|
|
|
|
|
QList<SessionInfo*> session;
|
|
|
|
QList<Rules*> rules;
|
|
|
|
KXMessages temporaryRulesMessages;
|
|
|
|
QTimer rulesUpdatedTimer;
|
2011-07-24 20:56:55 +00:00
|
|
|
QTimer screenChangedTimer;
|
2011-01-30 14:34:42 +00:00
|
|
|
bool rules_updates_disabled;
|
|
|
|
static const char* windowTypeToTxt(NET::WindowType type);
|
|
|
|
static NET::WindowType txtToWindowType(const char* txt);
|
|
|
|
static bool sessionInfoWindowTypeMatch(Client* c, SessionInfo* info);
|
|
|
|
|
|
|
|
Client* active_client;
|
|
|
|
Client* last_active_client;
|
|
|
|
Client* most_recently_raised; // Used ONLY by raiseOrLowerClient()
|
|
|
|
Client* movingClient;
|
|
|
|
Client* pending_take_activity;
|
|
|
|
int active_screen;
|
|
|
|
|
|
|
|
// Delay(ed) window focus timer and client
|
|
|
|
QTimer* delayFocusTimer;
|
|
|
|
Client* delayfocus_client;
|
|
|
|
QPoint focusMousePos;
|
|
|
|
|
|
|
|
ClientList clients;
|
|
|
|
ClientList desktops;
|
|
|
|
UnmanagedList unmanaged;
|
|
|
|
DeletedList deleted;
|
|
|
|
|
2012-04-08 08:07:35 +00:00
|
|
|
ToplevelList unconstrained_stacking_order; // Topmost last
|
|
|
|
ToplevelList stacking_order; // Topmost last
|
2011-01-30 14:34:42 +00:00
|
|
|
bool force_restacking;
|
|
|
|
mutable ToplevelList x_stacking; // From XQueryTree()
|
|
|
|
mutable bool x_stacking_dirty;
|
|
|
|
QVector< ClientList > focus_chain; // Currently ative last
|
|
|
|
ClientList global_focus_chain; // This one is only for things like tabbox's MRU
|
|
|
|
ClientList should_get_focus; // Last is most recent
|
|
|
|
ClientList attention_chain;
|
|
|
|
|
|
|
|
bool showing_desktop;
|
|
|
|
ClientList showing_desktop_clients;
|
|
|
|
int block_showing_desktop;
|
|
|
|
|
|
|
|
GroupList groups;
|
|
|
|
|
|
|
|
bool was_user_interaction;
|
|
|
|
bool session_saving;
|
|
|
|
int session_active_client;
|
|
|
|
int session_desktop;
|
|
|
|
|
|
|
|
int block_focus;
|
|
|
|
|
2011-06-30 11:02:30 +00:00
|
|
|
#ifdef KWIN_BUILD_TABBOX
|
2011-01-30 14:34:42 +00:00
|
|
|
TabBox::TabBox* tab_box;
|
2011-06-30 11:02:30 +00:00
|
|
|
#endif
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
QMenu* popup;
|
|
|
|
QMenu* advanced_popup;
|
|
|
|
QMenu* desk_popup;
|
|
|
|
QMenu* activity_popup;
|
|
|
|
QMenu* add_tabs_popup; // Menu to add the group to other group
|
|
|
|
QMenu* switch_to_tab_popup; // Menu to change tab
|
|
|
|
|
|
|
|
void modalActionsSwitch(bool enabled);
|
|
|
|
|
|
|
|
KActionCollection* keys;
|
|
|
|
KActionCollection* client_keys;
|
2011-06-25 16:05:07 +00:00
|
|
|
KActionCollection* disable_shortcuts_keys;
|
2011-01-30 14:34:42 +00:00
|
|
|
QAction* mResizeOpAction;
|
|
|
|
QAction* mMoveOpAction;
|
|
|
|
QAction* mMaximizeOpAction;
|
|
|
|
QAction* mShadeOpAction;
|
|
|
|
QAction* mTilingStateOpAction;
|
|
|
|
QAction* mKeepAboveOpAction;
|
|
|
|
QAction* mKeepBelowOpAction;
|
|
|
|
QAction* mFullScreenOpAction;
|
|
|
|
QAction* mNoBorderOpAction;
|
|
|
|
QAction* mMinimizeOpAction;
|
|
|
|
QAction* mCloseOpAction;
|
2012-01-12 06:42:55 +00:00
|
|
|
QAction* mRemoveFromTabGroup; // Remove client from group
|
|
|
|
QAction* mCloseTabGroup; // Close all clients in the group
|
2011-01-30 14:34:42 +00:00
|
|
|
ShortcutDialog* client_keys_dialog;
|
|
|
|
Client* client_keys_client;
|
|
|
|
bool global_shortcuts_disabled;
|
|
|
|
bool global_shortcuts_disabled_for_client;
|
|
|
|
|
|
|
|
PluginMgr* mgr;
|
|
|
|
|
|
|
|
RootInfo* rootInfo;
|
|
|
|
QWidget* supportWindow;
|
|
|
|
|
|
|
|
// Swallowing
|
|
|
|
QStringList doNotManageList;
|
|
|
|
|
|
|
|
// Colormap handling
|
|
|
|
Colormap default_colormap;
|
|
|
|
Colormap installed_colormap;
|
|
|
|
|
|
|
|
// Timer to collect requests for 'reconfigure'
|
|
|
|
QTimer reconfigureTimer;
|
|
|
|
|
|
|
|
QTimer updateToolWindowsTimer;
|
|
|
|
|
|
|
|
static Workspace* _self;
|
|
|
|
|
|
|
|
bool workspaceInit;
|
|
|
|
|
|
|
|
KStartupInfo* startup;
|
|
|
|
|
|
|
|
Placement* initPositioning;
|
|
|
|
|
|
|
|
QVector<QRect> workarea; // Array of workareas for virtual desktops
|
|
|
|
// Array of restricted areas that window cannot be moved into
|
|
|
|
QVector<StrutRects> restrictedmovearea;
|
|
|
|
// Array of the previous restricted areas that window cannot be moved into
|
|
|
|
QVector<StrutRects> oldrestrictedmovearea;
|
|
|
|
QVector< QVector<QRect> > screenarea; // Array of workareas per xinerama screen for all virtual desktops
|
2011-09-30 11:22:39 +00:00
|
|
|
QVector< QRect > oldscreensizes; // array of previous sizes of xinerama screens
|
2011-09-30 12:50:18 +00:00
|
|
|
QSize olddisplaysize; // previous sizes od displayWidth()/displayHeight()
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
int set_active_client_recursion;
|
|
|
|
int block_stacking_updates; // When > 0, stacking updates are temporarily disabled
|
|
|
|
bool blocked_propagating_new_clients; // Propagate also new clients after enabling stacking updates?
|
|
|
|
Window null_focus_window;
|
|
|
|
bool forced_global_mouse_grab;
|
|
|
|
friend class StackingUpdatesBlocker;
|
|
|
|
|
|
|
|
KSelectionOwner* cm_selection;
|
2011-03-20 14:42:05 +00:00
|
|
|
bool compositingSuspended, compositingBlocked;
|
2011-02-01 15:35:51 +00:00
|
|
|
QBasicTimer compositeTimer;
|
2011-01-30 14:34:42 +00:00
|
|
|
QTimer mousePollingTimer;
|
2012-03-29 20:11:28 +00:00
|
|
|
uint vBlankInterval, fpsInterval;
|
2011-01-30 14:34:42 +00:00
|
|
|
int xrrRefreshRate; // used only for compositing
|
|
|
|
QRegion repaints_region;
|
|
|
|
QSlider* transSlider;
|
|
|
|
QPushButton* transButton;
|
|
|
|
QTimer unredirectTimer;
|
|
|
|
bool forceUnredirectCheck;
|
|
|
|
QTimer compositeResetTimer; // for compressing composite resets
|
2011-05-15 11:22:28 +00:00
|
|
|
bool m_finishingCompositing; // finishCompositing() sets this variable while shutting down
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-04-12 13:19:38 +00:00
|
|
|
Scripting *m_scripting;
|
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
private:
|
|
|
|
friend bool performTransiencyCheck();
|
|
|
|
};
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
/**
|
|
|
|
* Helper for Workspace::blockStackingUpdates() being called in pairs (True/false)
|
|
|
|
*/
|
2007-04-29 17:35:43 +00:00
|
|
|
class StackingUpdatesBlocker
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
StackingUpdatesBlocker(Workspace* w)
|
|
|
|
: ws(w) {
|
|
|
|
ws->blockStackingUpdates(true);
|
|
|
|
}
|
|
|
|
~StackingUpdatesBlocker() {
|
|
|
|
ws->blockStackingUpdates(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Workspace* ws;
|
|
|
|
};
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
/**
|
|
|
|
* NET WM Protocol handler class
|
|
|
|
*/
|
2007-04-29 17:35:43 +00:00
|
|
|
class RootInfo : public NETRootInfo
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
typedef KWin::Client Client; // Because of NET::Client
|
|
|
|
|
|
|
|
public:
|
|
|
|
RootInfo(Workspace* ws, Display* dpy, Window w, const char* name, unsigned long pr[],
|
|
|
|
int pr_num, int scr = -1);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void changeNumberOfDesktops(int n);
|
|
|
|
virtual void changeCurrentDesktop(int d);
|
|
|
|
virtual void changeActiveWindow(Window w, NET::RequestSource src, Time timestamp, Window active_window);
|
|
|
|
virtual void closeWindow(Window w);
|
|
|
|
virtual void moveResize(Window w, int x_root, int y_root, unsigned long direction);
|
|
|
|
virtual void moveResizeWindow(Window w, int flags, int x, int y, int width, int height);
|
|
|
|
virtual void gotPing(Window w, Time timestamp);
|
|
|
|
virtual void restackWindow(Window w, RequestSource source, Window above, int detail, Time timestamp);
|
|
|
|
virtual void gotTakeActivity(Window w, Time timestamp, long flags);
|
|
|
|
virtual void changeShowingDesktop(bool showing);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Workspace* workspace;
|
|
|
|
};
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// Desktop layout
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
inline int Workspace::numberOfDesktops() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopCount_;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
inline QSize Workspace::desktopGridSize() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopGridSize_;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
inline int Workspace::desktopGridWidth() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopGridSize_.width();
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-02-14 15:40:52 +00:00
|
|
|
|
|
|
|
inline int Workspace::desktopGridHeight() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopGridSize_.height();
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-02-14 15:40:52 +00:00
|
|
|
|
|
|
|
inline int Workspace::workspaceWidth() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopGridSize_.width() * displayWidth();
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-02-14 15:40:52 +00:00
|
|
|
|
|
|
|
inline int Workspace::workspaceHeight() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopGridSize_.height() * displayHeight();
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
inline int Workspace::currentDesktop() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return currentDesktop_;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline int Workspace::desktopAtCoords(QPoint coords) const
|
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return desktopGrid_[coords.y() * desktopGridSize_.width() + coords.x()];
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-02-14 09:46:12 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// Unsorted
|
|
|
|
|
|
|
|
inline bool Workspace::initializing() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return workspaceInit;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-02-14 09:46:12 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
inline Client* Workspace::activeClient() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return active_client;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-02-14 09:46:12 +00:00
|
|
|
|
2009-02-14 15:40:52 +00:00
|
|
|
inline Client* Workspace::mostRecentlyActivatedClient() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2009-02-14 15:40:52 +00:00
|
|
|
return should_get_focus.count() > 0 ? should_get_focus.last() : active_client;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::addGroup(Group* group, allowed_t)
|
|
|
|
{
|
2010-09-21 14:31:40 +00:00
|
|
|
emit groupAdded(group);
|
2011-01-30 14:34:42 +00:00
|
|
|
groups.append(group);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::removeGroup(Group* group, allowed_t)
|
|
|
|
{
|
|
|
|
groups.removeAll(group);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2012-04-08 08:07:35 +00:00
|
|
|
inline const ToplevelList& Workspace::stackingOrder() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2008-12-18 13:50:57 +00:00
|
|
|
// TODO: Q_ASSERT( block_stacking_updates == 0 );
|
2007-04-29 17:35:43 +00:00
|
|
|
return stacking_order;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::showWindowMenu(QPoint pos, Client* cl)
|
|
|
|
{
|
|
|
|
showWindowMenu(QRect(pos, pos), cl);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::showWindowMenu(int x, int y, Client* cl)
|
|
|
|
{
|
|
|
|
showWindowMenu(QRect(QPoint(x, y), QPoint(x, y)), cl);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2012-04-16 16:16:38 +00:00
|
|
|
inline bool Workspace::windowMenuShown()
|
|
|
|
{
|
|
|
|
return popup && ((QWidget*)popup)->isVisible();
|
|
|
|
}
|
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline void Workspace::setWasUserInteraction()
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
was_user_interaction = true;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline bool Workspace::wasUserInteraction() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
return was_user_interaction;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
inline void Workspace::sessionSaveStarted()
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
session_saving = true;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
inline bool Workspace::sessionSaving() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
return session_saving;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
inline bool Workspace::forcedGlobalMouseGrab() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
return forced_global_mouse_grab;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
inline bool Workspace::showingDesktop() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
return showing_desktop;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
inline bool Workspace::globalShortcutsDisabled() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-29 17:35:43 +00:00
|
|
|
return global_shortcuts_disabled || global_shortcuts_disabled_for_client;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline bool Workspace::rulesUpdatesDisabled() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-04-30 12:24:10 +00:00
|
|
|
return rules_updates_disabled;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-30 12:24:10 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline void Workspace::forceRestacking()
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-07-04 09:51:10 +00:00
|
|
|
force_restacking = true;
|
2011-01-30 14:34:42 +00:00
|
|
|
StackingUpdatesBlocker blocker(this); // Do restacking if not blocked
|
|
|
|
}
|
2007-07-04 09:51:10 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::updateFocusMousePosition(const QPoint& pos)
|
|
|
|
{
|
2007-08-24 09:46:56 +00:00
|
|
|
focusMousePos = pos;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-08-24 09:46:56 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline QPoint Workspace::focusMousePosition() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-08-24 09:46:56 +00:00
|
|
|
return focusMousePos;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-08-24 09:46:56 +00:00
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
template< typename T >
|
2011-01-30 14:34:42 +00:00
|
|
|
inline Client* Workspace::findClient(T predicate) const
|
|
|
|
{
|
|
|
|
if (Client* ret = findClientInList(clients, predicate))
|
2007-04-29 17:35:43 +00:00
|
|
|
return ret;
|
2011-01-30 14:34:42 +00:00
|
|
|
if (Client* ret = findClientInList(desktops, predicate))
|
2007-04-29 17:35:43 +00:00
|
|
|
return ret;
|
|
|
|
return NULL;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
template< typename T1, typename T2 >
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::forEachClient(T1 procedure, T2 predicate)
|
|
|
|
{
|
|
|
|
for (ClientList::ConstIterator it = clients.constBegin(); it != clients.constEnd(); ++it)
|
|
|
|
if (predicate(const_cast<const Client*>(*it)))
|
|
|
|
procedure(*it);
|
|
|
|
for (ClientList::ConstIterator it = desktops.constBegin(); it != desktops.constEnd(); ++it)
|
|
|
|
if (predicate(const_cast<const Client*>(*it)))
|
|
|
|
procedure(*it);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
template< typename T >
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::forEachClient(T procedure)
|
|
|
|
{
|
|
|
|
return forEachClient(procedure, TruePredicate());
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
template< typename T >
|
2011-01-30 14:34:42 +00:00
|
|
|
inline Unmanaged* Workspace::findUnmanaged(T predicate) const
|
|
|
|
{
|
|
|
|
return findUnmanagedInList(unmanaged, predicate);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
template< typename T1, typename T2 >
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::forEachUnmanaged(T1 procedure, T2 predicate)
|
|
|
|
{
|
|
|
|
for (UnmanagedList::ConstIterator it = unmanaged.constBegin(); it != unmanaged.constEnd(); ++it)
|
|
|
|
if (predicate(const_cast<const Unmanaged*>(*it)))
|
|
|
|
procedure(*it);
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
template< typename T >
|
2011-01-30 14:34:42 +00:00
|
|
|
inline void Workspace::forEachUnmanaged(T procedure)
|
|
|
|
{
|
|
|
|
return forEachUnmanaged(procedure, TruePredicate());
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
KWIN_COMPARE_PREDICATE(ClientMatchPredicate, Client, const Client*, cl == value);
|
2008-12-18 13:50:57 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
inline bool Workspace::hasClient(const Client* c)
|
|
|
|
{
|
|
|
|
return findClient(ClientMatchPredicate(c));
|
|
|
|
}
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline void Workspace::checkCompositeTimer()
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-02-01 15:35:51 +00:00
|
|
|
if (!compositeTimer.isActive())
|
2008-08-30 15:28:47 +00:00
|
|
|
setCompositeTimer();
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2008-08-30 15:28:47 +00:00
|
|
|
|
2012-03-29 20:11:28 +00:00
|
|
|
inline int Workspace::nextFrameDelay()
|
|
|
|
{
|
|
|
|
return m_nextFrameDelay;
|
|
|
|
}
|
|
|
|
|
2011-04-28 13:56:50 +00:00
|
|
|
inline bool Workspace::hasDecorationPlugin() const
|
|
|
|
{
|
|
|
|
if (!mgr) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return !mgr->hasNoDecoration();
|
|
|
|
}
|
|
|
|
|
2008-12-18 13:50:57 +00:00
|
|
|
inline bool Workspace::hasDecorationShadows() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-04-28 13:56:50 +00:00
|
|
|
if (!hasDecorationPlugin()) {
|
|
|
|
return false;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
return mgr->factory()->supports(AbilityProvidesShadow);
|
|
|
|
}
|
2008-10-17 10:30:43 +00:00
|
|
|
|
2011-04-25 15:04:04 +00:00
|
|
|
inline Qt::Corner Workspace::decorationCloseButtonCorner()
|
|
|
|
{
|
|
|
|
if (!hasDecorationPlugin()) {
|
|
|
|
return Qt::TopRightCorner;
|
|
|
|
}
|
|
|
|
return mgr->factory()->closeButtonCorner();
|
|
|
|
}
|
|
|
|
|
2009-05-04 22:35:33 +00:00
|
|
|
inline bool Workspace::decorationHasAlpha() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-04-28 13:56:50 +00:00
|
|
|
if (!hasDecorationPlugin()) {
|
|
|
|
return false;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
return mgr->factory()->supports(AbilityUsesAlphaChannel);
|
|
|
|
}
|
2009-05-04 22:35:33 +00:00
|
|
|
|
2012-01-12 06:42:55 +00:00
|
|
|
inline bool Workspace::decorationSupportsTabbing() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-04-28 13:56:50 +00:00
|
|
|
if (!hasDecorationPlugin()) {
|
|
|
|
return false;
|
|
|
|
}
|
2012-01-12 06:42:55 +00:00
|
|
|
return mgr->factory()->supports(AbilityTabbing);
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2009-11-15 03:24:04 +00:00
|
|
|
|
2009-12-16 20:51:54 +00:00
|
|
|
inline bool Workspace::decorationSupportsFrameOverlap() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-04-28 13:56:50 +00:00
|
|
|
if (!hasDecorationPlugin()) {
|
|
|
|
return false;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
return mgr->factory()->supports(AbilityExtendIntoClientArea);
|
|
|
|
}
|
2009-12-16 20:51:54 +00:00
|
|
|
|
2010-11-10 18:33:07 +00:00
|
|
|
inline bool Workspace::decorationSupportsBlurBehind() const
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-04-28 13:56:50 +00:00
|
|
|
if (!hasDecorationPlugin()) {
|
|
|
|
return false;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
return mgr->factory()->supports(AbilityUsesBlurBehind);
|
|
|
|
}
|
2010-11-10 18:33:07 +00:00
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|