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>
|
2012-04-12 09:28:55 +00:00
|
|
|
Copyright (C) 2012 Martin Gräßlin <m.graesslin@kde.org>
|
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_OPTIONS_H
|
|
|
|
#define KWIN_OPTIONS_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QFont>
|
|
|
|
#include <QPalette>
|
2008-01-29 16:44:41 +00:00
|
|
|
#include <kdecoration.h>
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
#include "placement.h"
|
2007-07-04 09:51:10 +00:00
|
|
|
#include "utils.h"
|
2010-05-05 11:44:04 +00:00
|
|
|
#include "tilinglayoutfactory.h"
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class Client;
|
2007-09-18 13:59:06 +00:00
|
|
|
class CompositingPrefs;
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2012-02-21 08:23:18 +00:00
|
|
|
class Options : public QObject, public KDecorationOptions
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2012-02-21 08:23:18 +00:00
|
|
|
Q_OBJECT
|
|
|
|
Q_ENUMS(FocusPolicy)
|
|
|
|
Q_ENUMS(MouseCommand)
|
|
|
|
Q_ENUMS(MouseWheelCommand)
|
|
|
|
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy NOTIFY focusPolicyChanged)
|
|
|
|
Q_PROPERTY(bool nextFocusPrefersMouse READ isNextFocusPrefersMouse WRITE setNextFocusPrefersMouse NOTIFY nextFocusPrefersMouseChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
Whether clicking on a window raises it in FocusFollowsMouse
|
|
|
|
mode or not.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool clickRaise READ isClickRaise WRITE setClickRaise NOTIFY clickRaiseChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
whether autoraise is enabled FocusFollowsMouse mode or not.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool autoRaise READ isAutoRaise WRITE setAutoRaise NOTIFY autoRaiseChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
autoraise interval
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int autoRaiseInterval READ autoRaiseInterval WRITE setAutoRaiseInterval NOTIFY autoRaiseIntervalChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
delayed focus interval
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int delayFocusInterval READ delayFocusInterval WRITE setDelayFocusInterval NOTIFY delayFocusIntervalChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
Whether shade hover is enabled or not
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool shadeHover READ isShadeHover WRITE setShadeHover NOTIFY shadeHoverChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
shade hover interval
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int shadeHoverInterval READ shadeHoverInterval WRITE setShadeHoverInterval NOTIFY shadeHoverIntervalChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* Whether tiling is enabled or not
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool tiling READ isTilingOn WRITE setTilingOn WRITE setTiling NOTIFY tilingChanged)
|
|
|
|
Q_PROPERTY(int tilingLayout READ tilingLayout WRITE setTilingLayout NOTIFY tilingLayoutChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* Tiling window raise policy.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int tilingRaisePolicy READ tilingRaisePolicy WRITE setTilingRaisePolicy NOTIFY tilingRaisePolicyChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client)
|
|
|
|
**/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool separateScreenFocus READ isSeparateScreenFocus WRITE setSeparateScreenFocus NOTIFY separateScreenFocusChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* whether active Xinerama screen is the one with mouse (or with the active window)
|
|
|
|
**/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool activeMouseScreen READ isActiveMouseScreen WRITE setActiveMouseScreen NOTIFY activeMouseScreenChanged)
|
|
|
|
Q_PROPERTY(int placement READ placement WRITE setPlacement NOTIFY placementChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
Q_PROPERTY(bool focusPolicyIsReasonable READ focusPolicyIsReasonable NOTIFY configChanged)
|
|
|
|
/**
|
|
|
|
* the size of the zone that triggers snapping on desktop borders
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int borderSnapZone READ borderSnapZone WRITE setBorderSnapZone NOTIFY borderSnapZoneChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* the size of the zone that triggers snapping with other windows
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int windowSnapZone READ windowSnapZone WRITE setWindowSnapZone NOTIFY windowSnapZoneChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* the size of the zone that triggers snapping on the screen center
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int centerSnapZone READ centerSnapZone WRITE setCenterSnapZone NOTIFY centerSnapZoneChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* snap only when windows will overlap
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool snapOnlyWhenOverlapping READ isSnapOnlyWhenOverlapping WRITE setSnapOnlyWhenOverlapping NOTIFY snapOnlyWhenOverlappingChanged)
|
|
|
|
Q_PROPERTY(bool showDesktopIsMinimizeAll READ isShowDesktopIsMinimizeAll WRITE setShowDesktopIsMinimizeAll NOTIFY showDesktopIsMinimizeAllChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* whether or not we roll over to the other edge when switching desktops past the edge
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool rollOverDesktops READ isRollOverDesktops WRITE setRollOverDesktops NOTIFY rollOverDesktopsChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* 0 - 4 , see Workspace::allowClientActivation()
|
|
|
|
**/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int focusStealingPreventionLevel READ focusStealingPreventionLevel WRITE setFocusStealingPreventionLevel NOTIFY focusStealingPreventionLevelChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool legacyFullscreenSupport READ isLegacyFullscreenSupport WRITE setLegacyFullscreenSupport NOTIFY legacyFullscreenSupportChanged)
|
|
|
|
Q_PROPERTY(WindowOperation operationTitlebarDblClick READ operationTitlebarDblClick WRITE setOperationTitlebarDblClick NOTIFY operationTitlebarDblClickChanged)
|
|
|
|
Q_PROPERTY(MouseCommand commandActiveTitlebar1 READ commandActiveTitlebar1 WRITE setCommandActiveTitlebar1 NOTIFY commandActiveTitlebar1Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandActiveTitlebar2 READ commandActiveTitlebar2 WRITE setCommandActiveTitlebar2 NOTIFY commandActiveTitlebar2Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandActiveTitlebar3 READ commandActiveTitlebar3 WRITE setCommandActiveTitlebar3 NOTIFY commandActiveTitlebar3Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandInactiveTitlebar1 READ commandInactiveTitlebar1 WRITE setCommandInactiveTitlebar1 NOTIFY commandInactiveTitlebar1Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandInactiveTitlebar2 READ commandInactiveTitlebar2 WRITE setCommandInactiveTitlebar2 NOTIFY commandInactiveTitlebar2Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandInactiveTitlebar3 READ commandInactiveTitlebar3 WRITE setCommandInactiveTitlebar3 NOTIFY commandInactiveTitlebar3Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandWindow1 READ commandWindow1 WRITE setCommandWindow1 NOTIFY commandWindow1Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandWindow2 READ commandWindow2 WRITE setCommandWindow2 NOTIFY commandWindow2Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandWindow3 READ commandWindow3 WRITE setCommandWindow3 NOTIFY commandWindow3Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandWindowWheel READ commandWindowWheel WRITE setCommandWindowWheel NOTIFY commandWindowWheelChanged)
|
|
|
|
Q_PROPERTY(MouseCommand commandAll1 READ commandAll1 WRITE setCommandAll1 NOTIFY commandAll1Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandAll2 READ commandAll2 WRITE setCommandAll2 NOTIFY commandAll2Changed)
|
|
|
|
Q_PROPERTY(MouseCommand commandAll3 READ commandAll3 WRITE setCommandAll3 NOTIFY commandAll3Changed)
|
|
|
|
Q_PROPERTY(uint keyCmdAllModKey READ keyCmdAllModKey WRITE setKeyCmdAllModKey NOTIFY keyCmdAllModKeyChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* whether the Geometry Tip should be shown during a window move/resize.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool showGeometryTip READ showGeometryTip WRITE setShowGeometryTip NOTIFY showGeometryTipChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* Whether electric borders are enabled. With electric borders
|
|
|
|
* you can change desktop by moving the mouse pointer towards the edge
|
|
|
|
* of the screen
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool electricBorders READ electricBorders NOTIFY electricBordersChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* the activation delay for electric borders in milliseconds.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int electricBorderDelay READ electricBorderDelay WRITE setElectricBorderDelay NOTIFY electricBorderDelayChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* the trigger cooldown for electric borders in milliseconds.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int electricBorderCooldown READ electricBorderCooldown WRITE setElectricBorderCooldown NOTIFY electricBorderCooldownChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* the number of pixels the mouse cursor is pushed back when it reaches the screen edge.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int electricBorderPushbackPixels READ electricBorderPushbackPixels WRITE setElectricBorderPushbackPixels NOTIFY electricBorderPushbackPixelsChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* Whether a window gets maximized when it reaches top screen edge while being moved.
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool electricBorderMaximize READ electricBorderMaximize WRITE setElectricBorderMaximize NOTIFY electricBorderMaximizeChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* Whether a window is tiled to half screen when reaching left or right screen edge while been moved
|
|
|
|
*/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool electricBorderTiling READ electricBorderTiling WRITE setElectricBorderTiling NOTIFY electricBorderTilingChanged)
|
|
|
|
Q_PROPERTY(bool borderlessMaximizedWindows READ borderlessMaximizedWindows WRITE setBorderlessMaximizedWindows NOTIFY borderlessMaximizedWindowsChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* timeout before non-responding application will be killed after attempt to close
|
|
|
|
**/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int killPingTimeout READ killPingTimeout WRITE setKillPingTimeout NOTIFY killPingTimeoutChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* Whether to hide utility windows for inactive applications.
|
|
|
|
**/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool hideUtilityWindowsForInactive READ isHideUtilityWindowsForInactive WRITE setHideUtilityWindowsForInactive NOTIFY hideUtilityWindowsForInactiveChanged)
|
|
|
|
Q_PROPERTY(bool inactiveTabsSkipTaskbar READ isInactiveTabsSkipTaskbar WRITE setInactiveTabsSkipTaskbar NOTIFY inactiveTabsSkipTaskbarChanged)
|
|
|
|
Q_PROPERTY(bool autogroupSimilarWindows READ isAutogroupSimilarWindows WRITE setAutogroupSimilarWindows NOTIFY autogroupSimilarWindowsChanged)
|
|
|
|
Q_PROPERTY(bool autogroupInForeground READ isAutogroupInForeground WRITE setAutogroupInForeground NOTIFY autogroupInForegroundChanged)
|
|
|
|
Q_PROPERTY(int compositingMode READ compositingMode WRITE setCompositingMode NOTIFY compositingModeChanged)
|
|
|
|
Q_PROPERTY(bool useCompositing READ isUseCompositing WRITE setUseCompositing NOTIFY useCompositingChanged)
|
|
|
|
Q_PROPERTY(bool compositingInitialized READ isCompositingInitialized WRITE setCompositingInitialized NOTIFY compositingInitializedChanged)
|
|
|
|
Q_PROPERTY(int hiddenPreviews READ hiddenPreviews WRITE setHiddenPreviews NOTIFY hiddenPreviewsChanged)
|
|
|
|
Q_PROPERTY(bool unredirectFullscreen READ isUnredirectFullscreen WRITE setUnredirectFullscreen NOTIFY unredirectFullscreenChanged)
|
2012-02-21 08:23:18 +00:00
|
|
|
/**
|
|
|
|
* 0 = no, 1 = yes when transformed,
|
|
|
|
* 2 = try trilinear when transformed; else 1,
|
|
|
|
* -1 = auto
|
|
|
|
**/
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(int glSmoothScale READ glSmoothScale WRITE setGlSmoothScale NOTIFY glSmoothScaleChanged)
|
|
|
|
Q_PROPERTY(bool glVSync READ isGlVSync WRITE setGlVSync NOTIFY glVSyncChanged)
|
|
|
|
Q_PROPERTY(bool xrenderSmoothScale READ isXrenderSmoothScale WRITE setXrenderSmoothScale NOTIFY xrenderSmoothScaleChanged)
|
|
|
|
Q_PROPERTY(uint maxFpsInterval READ maxFpsInterval WRITE setMaxFpsInterval NOTIFY maxFpsIntervalChanged)
|
|
|
|
Q_PROPERTY(uint refreshRate READ refreshRate WRITE setRefreshRate NOTIFY refreshRateChanged)
|
2012-03-29 20:11:28 +00:00
|
|
|
Q_PROPERTY(uint vBlankTime READ vBlankTime WRITE setVBlankTime NOTIFY vBlankTimeChanged)
|
2012-04-12 06:34:46 +00:00
|
|
|
Q_PROPERTY(bool glDirect READ isGlDirect WRITE setGlDirect NOTIFY glDirectChanged)
|
|
|
|
Q_PROPERTY(bool glStrictBinding READ isGlStrictBinding WRITE setGlStrictBinding NOTIFY glStrictBindingChanged)
|
2012-04-28 08:53:55 +00:00
|
|
|
/**
|
|
|
|
* Whether strict binding follows the driver or has been overwritten by a user defined config value.
|
|
|
|
* If @c true @link glStrictBinding is set by the OpenGL Scene during initialization.
|
|
|
|
* If @c false @link glStrictBinding is set from a config value and not updated during scene initialization.
|
|
|
|
**/
|
|
|
|
Q_PROPERTY(bool glStrictBindingFollowsDriver READ isGlStrictBindingFollowsDriver WRITE setGlStrictBindingFollowsDriver NOTIFY glStrictBindingFollowsDriverChanged)
|
2011-01-30 14:34:42 +00:00
|
|
|
public:
|
|
|
|
|
2012-02-21 08:23:18 +00:00
|
|
|
Options(QObject *parent = NULL);
|
2011-01-30 14:34:42 +00:00
|
|
|
~Options();
|
|
|
|
|
|
|
|
virtual unsigned long updateSettings();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Different focus policies:
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
<li>ClickToFocus - Clicking into a window activates it. This is
|
|
|
|
also the default.
|
|
|
|
|
|
|
|
<li>FocusFollowsMouse - Moving the mouse pointer actively onto a
|
|
|
|
normal window activates it. For convenience, the desktop and
|
|
|
|
windows on the dock are excluded. They require clicking.
|
|
|
|
|
|
|
|
<li>FocusUnderMouse - The window that happens to be under the
|
|
|
|
mouse pointer becomes active. The invariant is: no window can
|
|
|
|
have focus that is not under the mouse. This also means that
|
|
|
|
Alt-Tab won't work properly and popup dialogs are usually
|
|
|
|
unsable with the keyboard. Note that the desktop and windows on
|
|
|
|
the dock are excluded for convenience. They get focus only when
|
|
|
|
clicking on it.
|
|
|
|
|
|
|
|
<li>FocusStrictlyUnderMouse - this is even worse than
|
|
|
|
FocusUnderMouse. Only the window under the mouse pointer is
|
|
|
|
active. If the mouse points nowhere, nothing has the focus. If
|
|
|
|
the mouse points onto the desktop, the desktop has focus. The
|
|
|
|
same holds for windows on the dock.
|
|
|
|
|
|
|
|
Note that FocusUnderMouse and FocusStrictlyUnderMouse are not
|
|
|
|
particulary useful. They are only provided for old-fashined
|
|
|
|
die-hard UNIX people ;-)
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
*/
|
|
|
|
enum FocusPolicy { ClickToFocus, FocusFollowsMouse, FocusUnderMouse, FocusStrictlyUnderMouse };
|
2012-02-20 09:25:13 +00:00
|
|
|
FocusPolicy focusPolicy() const {
|
|
|
|
return m_focusPolicy;
|
|
|
|
}
|
|
|
|
bool isNextFocusPrefersMouse() const {
|
|
|
|
return m_nextFocusPrefersMouse;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Whether clicking on a window raises it in FocusFollowsMouse
|
|
|
|
mode or not.
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isClickRaise() const {
|
|
|
|
return m_clickRaise;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
whether autoraise is enabled FocusFollowsMouse mode or not.
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isAutoRaise() const {
|
|
|
|
return m_autoRaise;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
autoraise interval
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int autoRaiseInterval() const {
|
|
|
|
return m_autoRaiseInterval;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
delayed focus interval
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int delayFocusInterval() const {
|
|
|
|
return m_delayFocusInterval;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Whether shade hover is enabled or not
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isShadeHover() const {
|
|
|
|
return m_shadeHover;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
shade hover interval
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int shadeHoverInterval() {
|
|
|
|
return m_shadeHoverInterval;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether tiling is enabled or not
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isTilingOn() const {
|
|
|
|
return m_tilingOn;
|
|
|
|
}
|
|
|
|
void setTilingOn(bool enabled) {
|
|
|
|
m_tilingOn = enabled;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tiling Layout
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
TilingLayoutFactory::Layouts tilingLayout() const {
|
|
|
|
return m_tilingLayout;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tiling window raise policy.
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int tilingRaisePolicy() const {
|
|
|
|
return m_tilingRaisePolicy;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
// whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client)
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isSeparateScreenFocus() const {
|
|
|
|
return m_separateScreenFocus;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
// whether active Xinerama screen is the one with mouse (or with the active window)
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isActiveMouseScreen() const {
|
|
|
|
return m_activeMouseScreen;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-02-20 09:25:13 +00:00
|
|
|
Placement::Policy placement() const {
|
|
|
|
return m_placement;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
bool focusPolicyIsReasonable() {
|
2012-02-20 09:25:13 +00:00
|
|
|
return m_focusPolicy == ClickToFocus || m_focusPolicy == FocusFollowsMouse;
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* the size of the zone that triggers snapping on desktop borders
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int borderSnapZone() const {
|
|
|
|
return m_borderSnapZone;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* the size of the zone that triggers snapping with other windows
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int windowSnapZone() const {
|
|
|
|
return m_windowSnapZone;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* the size of the zone that triggers snapping on the screen center
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
int centerSnapZone() const {
|
|
|
|
return m_centerSnapZone;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* snap only when windows will overlap
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isSnapOnlyWhenOverlapping() const {
|
|
|
|
return m_snapOnlyWhenOverlapping;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isShowDesktopIsMinimizeAll() const {
|
|
|
|
return m_showDesktopIsMinimizeAll;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* whether or not we roll over to the other edge when switching desktops past the edge
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isRollOverDesktops() const {
|
|
|
|
return m_rollOverDesktops;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
// 0 - 4 , see Workspace::allowClientActivation()
|
2012-02-20 09:25:13 +00:00
|
|
|
int focusStealingPreventionLevel() const {
|
|
|
|
return m_focusStealingPreventionLevel;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry
|
|
|
|
*/
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isLegacyFullscreenSupport() const {
|
|
|
|
return m_legacyFullscreenSupport;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-02-20 11:29:59 +00:00
|
|
|
WindowOperation operationTitlebarDblClick() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return OpTitlebarDblClick;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum MouseCommand {
|
|
|
|
MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
|
|
|
|
MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
|
|
|
|
MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
|
|
|
|
MouseMove, MouseUnrestrictedMove,
|
|
|
|
MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove,
|
|
|
|
MouseResize, MouseUnrestrictedResize,
|
|
|
|
MouseShade, MouseSetShade, MouseUnsetShade,
|
|
|
|
MouseMaximize, MouseRestore, MouseMinimize,
|
|
|
|
MouseNextDesktop, MousePreviousDesktop,
|
|
|
|
MouseAbove, MouseBelow,
|
|
|
|
MouseOpacityMore, MouseOpacityLess,
|
2012-01-12 06:42:55 +00:00
|
|
|
MouseClose, MousePreviousTab, MouseNextTab, MouseDragTab,
|
2011-01-30 14:34:42 +00:00
|
|
|
MouseNothing
|
|
|
|
};
|
|
|
|
|
|
|
|
enum MouseWheelCommand {
|
|
|
|
MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
|
|
|
|
MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
|
2012-01-12 06:42:55 +00:00
|
|
|
MouseWheelChangeOpacity, MouseWheelChangeCurrentTab,
|
2011-01-30 14:34:42 +00:00
|
|
|
MouseWheelNothing
|
2007-04-29 17:35:43 +00:00
|
|
|
};
|
|
|
|
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand operationTitlebarMouseWheel(int delta) const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return wheelToMouseCommand(CmdTitlebarWheel, delta);
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand operationWindowMouseWheel(int delta) const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return wheelToMouseCommand(CmdAllWheel, delta);
|
|
|
|
}
|
|
|
|
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandActiveTitlebar1() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdActiveTitlebar1;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandActiveTitlebar2() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdActiveTitlebar2;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandActiveTitlebar3() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdActiveTitlebar3;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandInactiveTitlebar1() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdInactiveTitlebar1;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandInactiveTitlebar2() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdInactiveTitlebar2;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandInactiveTitlebar3() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdInactiveTitlebar3;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandWindow1() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdWindow1;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandWindow2() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdWindow2;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandWindow3() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdWindow3;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandWindowWheel() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdWindowWheel;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandAll1() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdAll1;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandAll2() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdAll2;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand commandAll3() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdAll3;
|
|
|
|
}
|
2012-02-20 11:29:59 +00:00
|
|
|
uint keyCmdAllModKey() const {
|
2011-01-30 14:34:42 +00:00
|
|
|
return CmdAllModKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ElectricBorderAction electricBorderAction(const QString& name);
|
|
|
|
static WindowOperation windowOperation(const QString &name, bool restricted);
|
|
|
|
static MouseCommand mouseCommand(const QString &name, bool restricted);
|
|
|
|
static MouseWheelCommand mouseWheelCommand(const QString &name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns true if the Geometry Tip should be shown during a window move/resize.
|
|
|
|
*/
|
2012-02-20 11:29:59 +00:00
|
|
|
bool showGeometryTip() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
|
|
|
|
/**
|
|
|
|
* @returns The action assigned to the specified electric border
|
|
|
|
*/
|
2012-02-20 11:29:59 +00:00
|
|
|
ElectricBorderAction electricBorderAction(ElectricBorder edge) const;
|
2011-01-30 14:34:42 +00:00
|
|
|
/**
|
|
|
|
* @returns true if electric borders are enabled. With electric borders
|
|
|
|
* you can change desktop by moving the mouse pointer towards the edge
|
|
|
|
* of the screen
|
|
|
|
*/
|
2012-02-20 11:29:59 +00:00
|
|
|
int electricBorders() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
/**
|
|
|
|
* @returns the activation delay for electric borders in milliseconds.
|
|
|
|
*/
|
2012-02-20 11:29:59 +00:00
|
|
|
int electricBorderDelay() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
/**
|
|
|
|
* @returns the trigger cooldown for electric borders in milliseconds.
|
|
|
|
*/
|
2012-02-20 11:29:59 +00:00
|
|
|
int electricBorderCooldown() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
/**
|
|
|
|
* @returns the number of pixels the mouse cursor is pushed back when it
|
|
|
|
* reaches the screen edge.
|
|
|
|
*/
|
|
|
|
int electricBorderPushbackPixels() const {
|
|
|
|
return electric_border_pushback_pixels;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @returns true if a window gets maximized when it reaches top screen edge
|
|
|
|
* while being moved.
|
|
|
|
*/
|
|
|
|
bool electricBorderMaximize() const {
|
|
|
|
return electric_border_maximize;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @returns true if window is tiled to half screen when reaching left or
|
|
|
|
* right screen edge while been moved
|
|
|
|
*/
|
|
|
|
bool electricBorderTiling() const {
|
|
|
|
return electric_border_tiling;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool borderlessMaximizedWindows() const {
|
|
|
|
return borderless_maximized_windows;
|
|
|
|
}
|
|
|
|
|
|
|
|
// timeout before non-responding application will be killed after attempt to close
|
2012-02-20 09:25:13 +00:00
|
|
|
int killPingTimeout() const {
|
|
|
|
return m_killPingTimeout;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
// Whether to hide utility windows for inactive applications.
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isHideUtilityWindowsForInactive() const {
|
|
|
|
return m_hideUtilityWindowsForInactive;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isInactiveTabsSkipTaskbar() const {
|
|
|
|
return m_inactiveTabsSkipTaskbar;
|
|
|
|
}
|
|
|
|
bool isAutogroupSimilarWindows() const {
|
|
|
|
return m_autogroupSimilarWindows;
|
|
|
|
}
|
|
|
|
bool isAutogroupInForeground() const {
|
|
|
|
return m_autogroupInForeground;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
// Desktop effects
|
|
|
|
double animationTimeFactor() const;
|
|
|
|
|
|
|
|
//----------------------
|
|
|
|
// Compositing settings
|
2011-02-27 22:39:32 +00:00
|
|
|
void reloadCompositingSettings(bool force = false);
|
2012-02-20 09:25:13 +00:00
|
|
|
CompositingType compositingMode() const {
|
|
|
|
return m_compositingMode;
|
|
|
|
}
|
|
|
|
void setCompositingMode(CompositingType mode) {
|
|
|
|
m_compositingMode = mode;
|
|
|
|
}
|
|
|
|
// Separate to mode so the user can toggle
|
|
|
|
bool isUseCompositing() const {
|
|
|
|
return m_useCompositing;
|
|
|
|
}
|
|
|
|
bool isCompositingInitialized() const {
|
|
|
|
return m_compositingInitialized;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
|
|
|
// General preferences
|
2012-02-20 09:25:13 +00:00
|
|
|
HiddenPreviews hiddenPreviews() const {
|
|
|
|
return m_hiddenPreviews;
|
|
|
|
}
|
|
|
|
bool isUnredirectFullscreen() const {
|
|
|
|
return m_unredirectFullscreen;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
// OpenGL
|
2012-02-20 09:25:13 +00:00
|
|
|
// 0 = no, 1 = yes when transformed,
|
2011-01-30 14:34:42 +00:00
|
|
|
// 2 = try trilinear when transformed; else 1,
|
|
|
|
// -1 = auto
|
2012-02-20 09:25:13 +00:00
|
|
|
int glSmoothScale() const {
|
|
|
|
return m_glSmoothScale;
|
|
|
|
}
|
|
|
|
bool isGlVSync() const {
|
|
|
|
return m_glVSync;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
// XRender
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isXrenderSmoothScale() const {
|
|
|
|
return m_xrenderSmoothScale;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-02-20 09:25:13 +00:00
|
|
|
uint maxFpsInterval() const {
|
|
|
|
return m_maxFpsInterval;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
// Settings that should be auto-detected
|
2012-02-20 09:25:13 +00:00
|
|
|
uint refreshRate() const {
|
|
|
|
return m_refreshRate;
|
|
|
|
}
|
2012-03-29 20:11:28 +00:00
|
|
|
uint vBlankTime() const {
|
|
|
|
return m_vBlankTime;
|
|
|
|
}
|
2012-02-20 09:25:13 +00:00
|
|
|
bool isGlDirect() const {
|
|
|
|
return m_glDirect;
|
|
|
|
}
|
|
|
|
bool isGlStrictBinding() const {
|
|
|
|
return m_glStrictBinding;
|
|
|
|
}
|
2012-04-28 08:53:55 +00:00
|
|
|
bool isGlStrictBindingFollowsDriver() const {
|
|
|
|
return m_glStrictBindingFollowsDriver;
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-04-12 06:34:46 +00:00
|
|
|
// setters
|
|
|
|
void setFocusPolicy(FocusPolicy focusPolicy);
|
|
|
|
void setNextFocusPrefersMouse(bool nextFocusPrefersMouse);
|
|
|
|
void setClickRaise(bool clickRaise);
|
|
|
|
void setAutoRaise(bool autoRaise);
|
|
|
|
void setAutoRaiseInterval(int autoRaiseInterval);
|
|
|
|
void setDelayFocusInterval(int delayFocusInterval);
|
|
|
|
void setShadeHover(bool shadeHover);
|
|
|
|
void setShadeHoverInterval(int shadeHoverInterval);
|
|
|
|
void setTiling(bool tiling);
|
|
|
|
void setTilingLayout(int tilingLayout);
|
|
|
|
void setTilingRaisePolicy(int tilingRaisePolicy);
|
|
|
|
void setSeparateScreenFocus(bool separateScreenFocus);
|
|
|
|
void setActiveMouseScreen(bool activeMouseScreen);
|
|
|
|
void setPlacement(int placement);
|
|
|
|
void setBorderSnapZone(int borderSnapZone);
|
|
|
|
void setWindowSnapZone(int windowSnapZone);
|
|
|
|
void setCenterSnapZone(int centerSnapZone);
|
|
|
|
void setSnapOnlyWhenOverlapping(bool snapOnlyWhenOverlapping);
|
|
|
|
void setShowDesktopIsMinimizeAll(bool showDesktopIsMinimizeAll);
|
|
|
|
void setRollOverDesktops(bool rollOverDesktops);
|
|
|
|
void setFocusStealingPreventionLevel(int focusStealingPreventionLevel);
|
|
|
|
void setLegacyFullscreenSupport(bool legacyFullscreenSupport);
|
|
|
|
void setOperationTitlebarDblClick(WindowOperation operationTitlebarDblClick);
|
|
|
|
void setCommandActiveTitlebar1(MouseCommand commandActiveTitlebar1);
|
|
|
|
void setCommandActiveTitlebar2(MouseCommand commandActiveTitlebar2);
|
|
|
|
void setCommandActiveTitlebar3(MouseCommand commandActiveTitlebar3);
|
|
|
|
void setCommandInactiveTitlebar1(MouseCommand commandInactiveTitlebar1);
|
|
|
|
void setCommandInactiveTitlebar2(MouseCommand commandInactiveTitlebar2);
|
|
|
|
void setCommandInactiveTitlebar3(MouseCommand commandInactiveTitlebar3);
|
|
|
|
void setCommandWindow1(MouseCommand commandWindow1);
|
|
|
|
void setCommandWindow2(MouseCommand commandWindow2);
|
|
|
|
void setCommandWindow3(MouseCommand commandWindow3);
|
|
|
|
void setCommandWindowWheel(MouseCommand commandWindowWheel);
|
|
|
|
void setCommandAll1(MouseCommand commandAll1);
|
|
|
|
void setCommandAll2(MouseCommand commandAll2);
|
|
|
|
void setCommandAll3(MouseCommand commandAll3);
|
|
|
|
void setKeyCmdAllModKey(uint keyCmdAllModKey);
|
|
|
|
void setShowGeometryTip(bool showGeometryTip);
|
|
|
|
void setElectricBorderDelay(int electricBorderDelay);
|
|
|
|
void setElectricBorderCooldown(int electricBorderCooldown);
|
|
|
|
void setElectricBorderPushbackPixels(int electricBorderPushbackPixels);
|
|
|
|
void setElectricBorderMaximize(bool electricBorderMaximize);
|
|
|
|
void setElectricBorderTiling(bool electricBorderTiling);
|
|
|
|
void setBorderlessMaximizedWindows(bool borderlessMaximizedWindows);
|
|
|
|
void setKillPingTimeout(int killPingTimeout);
|
|
|
|
void setHideUtilityWindowsForInactive(bool hideUtilityWindowsForInactive);
|
|
|
|
void setInactiveTabsSkipTaskbar(bool inactiveTabsSkipTaskbar);
|
|
|
|
void setAutogroupSimilarWindows(bool autogroupSimilarWindows);
|
|
|
|
void setAutogroupInForeground(bool autogroupInForeground);
|
|
|
|
void setCompositingMode(int compositingMode);
|
|
|
|
void setUseCompositing(bool useCompositing);
|
|
|
|
void setCompositingInitialized(bool compositingInitialized);
|
|
|
|
void setHiddenPreviews(int hiddenPreviews);
|
|
|
|
void setUnredirectFullscreen(bool unredirectFullscreen);
|
|
|
|
void setGlSmoothScale(int glSmoothScale);
|
|
|
|
void setGlVSync(bool glVSync);
|
|
|
|
void setXrenderSmoothScale(bool xrenderSmoothScale);
|
|
|
|
void setMaxFpsInterval(uint maxFpsInterval);
|
|
|
|
void setRefreshRate(uint refreshRate);
|
2012-03-29 20:11:28 +00:00
|
|
|
void setVBlankTime(uint vBlankTime);
|
2012-04-12 06:34:46 +00:00
|
|
|
void setGlDirect(bool glDirect);
|
|
|
|
void setGlStrictBinding(bool glStrictBinding);
|
2012-04-28 08:53:55 +00:00
|
|
|
void setGlStrictBindingFollowsDriver(bool glStrictBindingFollowsDriver);
|
2012-04-12 06:34:46 +00:00
|
|
|
|
2012-04-12 07:24:14 +00:00
|
|
|
// default values
|
|
|
|
static FocusPolicy defaultFocusPolicy() {
|
|
|
|
return ClickToFocus;
|
|
|
|
}
|
|
|
|
static bool defaultNextFocusPrefersMouse() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool defaultClickRaise() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultAutoRaise() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static int defaultAutoRaiseInterval() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static int defaultDelayFocusInterval() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static bool defaultShadeHover() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static int defaultShadeHoverInterval() {
|
|
|
|
return 250;
|
|
|
|
}
|
|
|
|
static bool defaultTiling() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static TilingLayoutFactory::Layouts defaultTilingLayout() {
|
|
|
|
return TilingLayoutFactory::DefaultLayout;
|
|
|
|
}
|
|
|
|
static int defaultTilingRaisePolicy() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static bool defaultSeparateScreenFocus() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool defaultActiveMouseScreen() {
|
|
|
|
// TODO: used to be m_focusPolicy != ClickToFocus
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static Placement::Policy defaultPlacement() {
|
|
|
|
return Placement::Default;
|
|
|
|
}
|
|
|
|
static int defaultBorderSnapZone() {
|
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
static int defaultWindowSnapZone() {
|
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
static int defaultCenterSnapZone() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static bool defaultSnapOnlyWhenOverlapping() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool defaultShowDesktopIsMinimizeAll() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool defaultRollOverDesktops() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static int defaultFocusStealingPreventionLevel() {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
static bool defaultLegacyFullscreenSupport() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static WindowOperation defaultOperationTitlebarDblClick() {
|
|
|
|
return MaximizeOp;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandActiveTitlebar1() {
|
|
|
|
return MouseRaise;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandActiveTitlebar2() {
|
|
|
|
return MouseDragTab;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandActiveTitlebar3() {
|
|
|
|
return MouseOperationsMenu;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandInactiveTitlebar1() {
|
|
|
|
return MouseActivateAndRaise;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandInactiveTitlebar2() {
|
|
|
|
return MouseDragTab;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandInactiveTitlebar3() {
|
|
|
|
return MouseOperationsMenu;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandWindow1() {
|
|
|
|
return MouseActivateRaiseAndPassClick;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandWindow2() {
|
|
|
|
return MouseActivateAndPassClick;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandWindow3() {
|
|
|
|
return MouseActivateAndPassClick;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandWindowWheel() {
|
|
|
|
return MouseNothing;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandAll1() {
|
|
|
|
return MouseUnrestrictedMove;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandAll2() {
|
|
|
|
return MouseToggleRaiseAndLower;
|
|
|
|
}
|
|
|
|
static MouseCommand defaultCommandAll3() {
|
|
|
|
return MouseUnrestrictedResize;
|
|
|
|
}
|
|
|
|
static MouseWheelCommand defaultCommandTitlebarWheel() {
|
|
|
|
return MouseWheelChangeCurrentTab;
|
|
|
|
}
|
|
|
|
static MouseWheelCommand defaultCommandAllWheel() {
|
|
|
|
return MouseWheelNothing;
|
|
|
|
}
|
|
|
|
static uint defaultKeyCmdAllModKey() {
|
|
|
|
return Qt::Key_Alt;
|
|
|
|
}
|
|
|
|
static bool defaultShowGeometryTip() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderTop() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderTopRight() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderRight() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderBottomRight() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderBottom() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderBottomLeft() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderLeft() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static ElectricBorderAction defaultElectricBorderTopLeft() {
|
|
|
|
return ElectricActionNone;
|
|
|
|
}
|
|
|
|
static int defaultElectricBorders() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static int defaultElectricBorderDelay() {
|
|
|
|
return 150;
|
|
|
|
}
|
|
|
|
static int defaultElectricBorderCooldown() {
|
|
|
|
return 350;
|
|
|
|
}
|
|
|
|
static int defaultElectricBorderPushbackPixels() {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
static bool defaultElectricBorderMaximize() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultElectricBorderTiling() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultBorderlessMaximizedWindows() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static int defaultKillPingTimeout() {
|
|
|
|
return 5000;
|
|
|
|
}
|
|
|
|
static bool defaultHideUtilityWindowsForInactive() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultInactiveTabsSkipTaskbar() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool defaultAutogroupSimilarWindows() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool defaultAutogroupInForeground() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static CompositingType defaultCompositingMode() {
|
|
|
|
return OpenGLCompositing;
|
|
|
|
}
|
|
|
|
static bool defaultUseCompositing() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultCompositingInitialized() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static HiddenPreviews defaultHiddenPreviews() {
|
|
|
|
return HiddenPreviewsShown;
|
|
|
|
}
|
|
|
|
static bool defaultUnredirectFullscreen() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static int defaultGlSmoothScale() {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
static bool defaultGlVSync() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultXrenderSmoothScale() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static uint defaultMaxFpsInterval() {
|
|
|
|
return qRound(1000.0/60.0);
|
|
|
|
}
|
|
|
|
static int defaultMaxFps() {
|
|
|
|
return 60;
|
|
|
|
}
|
|
|
|
static uint defaultRefreshRate() {
|
|
|
|
return 0;
|
|
|
|
}
|
2012-03-29 20:11:28 +00:00
|
|
|
static uint defaultVBlankTime() {
|
|
|
|
return 6144;
|
|
|
|
}
|
2012-04-12 07:24:14 +00:00
|
|
|
static bool defaultGlDirect() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool defaultGlStrictBinding() {
|
|
|
|
return true;
|
|
|
|
}
|
2012-04-28 08:53:55 +00:00
|
|
|
static bool defaultGlStrictBindingFollowsDriver() {
|
|
|
|
return true;
|
|
|
|
}
|
2012-04-12 07:24:14 +00:00
|
|
|
static int defaultAnimationSpeed() {
|
|
|
|
return 3;
|
|
|
|
}
|
2012-04-12 17:42:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Performs loading all settings except compositing related.
|
|
|
|
**/
|
|
|
|
unsigned long loadConfig();
|
|
|
|
/**
|
|
|
|
* Performs loading of compositing settings which do not depend on OpenGL.
|
|
|
|
**/
|
|
|
|
bool loadCompositingConfig(bool force);
|
|
|
|
void reparseConfiguration();
|
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
//----------------------
|
2012-02-21 08:23:18 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void configChanged();
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2012-04-12 06:34:46 +00:00
|
|
|
// for properties
|
|
|
|
void focusPolicyChanged();
|
|
|
|
void nextFocusPrefersMouseChanged();
|
|
|
|
void clickRaiseChanged();
|
|
|
|
void autoRaiseChanged();
|
|
|
|
void autoRaiseIntervalChanged();
|
|
|
|
void delayFocusIntervalChanged();
|
|
|
|
void shadeHoverChanged();
|
|
|
|
void shadeHoverIntervalChanged();
|
|
|
|
void tilingChanged();
|
|
|
|
void tilingLayoutChanged();
|
|
|
|
void tilingRaisePolicyChanged();
|
|
|
|
void separateScreenFocusChanged();
|
|
|
|
void activeMouseScreenChanged();
|
|
|
|
void placementChanged();
|
|
|
|
void borderSnapZoneChanged();
|
|
|
|
void windowSnapZoneChanged();
|
|
|
|
void centerSnapZoneChanged();
|
|
|
|
void snapOnlyWhenOverlappingChanged();
|
|
|
|
void showDesktopIsMinimizeAllChanged();
|
|
|
|
void rollOverDesktopsChanged();
|
|
|
|
void focusStealingPreventionLevelChanged();
|
|
|
|
void legacyFullscreenSupportChanged();
|
|
|
|
void operationTitlebarDblClickChanged();
|
|
|
|
void commandActiveTitlebar1Changed();
|
|
|
|
void commandActiveTitlebar2Changed();
|
|
|
|
void commandActiveTitlebar3Changed();
|
|
|
|
void commandInactiveTitlebar1Changed();
|
|
|
|
void commandInactiveTitlebar2Changed();
|
|
|
|
void commandInactiveTitlebar3Changed();
|
|
|
|
void commandWindow1Changed();
|
|
|
|
void commandWindow2Changed();
|
|
|
|
void commandWindow3Changed();
|
|
|
|
void commandWindowWheelChanged();
|
|
|
|
void commandAll1Changed();
|
|
|
|
void commandAll2Changed();
|
|
|
|
void commandAll3Changed();
|
|
|
|
void keyCmdAllModKeyChanged();
|
|
|
|
void showGeometryTipChanged();
|
|
|
|
void electricBordersChanged();
|
|
|
|
void electricBorderDelayChanged();
|
|
|
|
void electricBorderCooldownChanged();
|
|
|
|
void electricBorderPushbackPixelsChanged();
|
|
|
|
void electricBorderMaximizeChanged();
|
|
|
|
void electricBorderTilingChanged();
|
|
|
|
void borderlessMaximizedWindowsChanged();
|
|
|
|
void killPingTimeoutChanged();
|
|
|
|
void hideUtilityWindowsForInactiveChanged();
|
|
|
|
void inactiveTabsSkipTaskbarChanged();
|
|
|
|
void autogroupSimilarWindowsChanged();
|
|
|
|
void autogroupInForegroundChanged();
|
|
|
|
void compositingModeChanged();
|
|
|
|
void useCompositingChanged();
|
|
|
|
void compositingInitializedChanged();
|
|
|
|
void hiddenPreviewsChanged();
|
|
|
|
void unredirectFullscreenChanged();
|
|
|
|
void glSmoothScaleChanged();
|
|
|
|
void glVSyncChanged();
|
|
|
|
void xrenderSmoothScaleChanged();
|
|
|
|
void maxFpsIntervalChanged();
|
|
|
|
void refreshRateChanged();
|
2012-03-29 20:11:28 +00:00
|
|
|
void vBlankTimeChanged();
|
2012-04-12 06:34:46 +00:00
|
|
|
void glDirectChanged();
|
|
|
|
void glStrictBindingChanged();
|
2012-04-28 08:53:55 +00:00
|
|
|
void glStrictBindingFollowsDriverChanged();
|
2012-04-12 06:34:46 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
private:
|
2012-04-12 06:34:46 +00:00
|
|
|
void setElectricBorders(int borders);
|
2012-02-20 09:25:13 +00:00
|
|
|
FocusPolicy m_focusPolicy;
|
|
|
|
bool m_nextFocusPrefersMouse;
|
|
|
|
bool m_clickRaise;
|
|
|
|
bool m_autoRaise;
|
|
|
|
int m_autoRaiseInterval;
|
|
|
|
int m_delayFocusInterval;
|
|
|
|
bool m_shadeHover;
|
|
|
|
int m_shadeHoverInterval;
|
|
|
|
bool m_tilingOn;
|
|
|
|
TilingLayoutFactory::Layouts m_tilingLayout;
|
|
|
|
int m_tilingRaisePolicy;
|
|
|
|
bool m_separateScreenFocus;
|
|
|
|
bool m_activeMouseScreen;
|
|
|
|
Placement::Policy m_placement;
|
|
|
|
int m_borderSnapZone;
|
|
|
|
int m_windowSnapZone;
|
|
|
|
int m_centerSnapZone;
|
|
|
|
bool m_snapOnlyWhenOverlapping;
|
|
|
|
bool m_showDesktopIsMinimizeAll;
|
|
|
|
bool m_rollOverDesktops;
|
|
|
|
int m_focusStealingPreventionLevel;
|
|
|
|
bool m_legacyFullscreenSupport;
|
|
|
|
int m_killPingTimeout;
|
|
|
|
bool m_hideUtilityWindowsForInactive;
|
|
|
|
bool m_inactiveTabsSkipTaskbar;
|
|
|
|
bool m_autogroupSimilarWindows;
|
|
|
|
bool m_autogroupInForeground;
|
|
|
|
|
|
|
|
CompositingType m_compositingMode;
|
|
|
|
bool m_useCompositing;
|
|
|
|
bool m_compositingInitialized;
|
|
|
|
HiddenPreviews m_hiddenPreviews;
|
|
|
|
bool m_unredirectFullscreen;
|
|
|
|
int m_glSmoothScale;
|
|
|
|
bool m_glVSync;
|
|
|
|
bool m_xrenderSmoothScale;
|
|
|
|
uint m_maxFpsInterval;
|
|
|
|
// Settings that should be auto-detected
|
|
|
|
uint m_refreshRate;
|
2012-03-29 20:11:28 +00:00
|
|
|
uint m_vBlankTime;
|
2012-02-20 09:25:13 +00:00
|
|
|
bool m_glDirect;
|
|
|
|
bool m_glStrictBinding;
|
2012-04-28 08:53:55 +00:00
|
|
|
bool m_glStrictBindingFollowsDriver;
|
2012-02-20 09:25:13 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
WindowOperation OpTitlebarDblClick;
|
|
|
|
|
|
|
|
// mouse bindings
|
|
|
|
MouseCommand CmdActiveTitlebar1;
|
|
|
|
MouseCommand CmdActiveTitlebar2;
|
|
|
|
MouseCommand CmdActiveTitlebar3;
|
|
|
|
MouseCommand CmdInactiveTitlebar1;
|
|
|
|
MouseCommand CmdInactiveTitlebar2;
|
|
|
|
MouseCommand CmdInactiveTitlebar3;
|
|
|
|
MouseWheelCommand CmdTitlebarWheel;
|
|
|
|
MouseCommand CmdWindow1;
|
|
|
|
MouseCommand CmdWindow2;
|
|
|
|
MouseCommand CmdWindow3;
|
|
|
|
MouseCommand CmdWindowWheel;
|
|
|
|
MouseCommand CmdAll1;
|
|
|
|
MouseCommand CmdAll2;
|
|
|
|
MouseCommand CmdAll3;
|
|
|
|
MouseWheelCommand CmdAllWheel;
|
|
|
|
uint CmdAllModKey;
|
|
|
|
|
|
|
|
ElectricBorderAction electric_border_top;
|
|
|
|
ElectricBorderAction electric_border_top_right;
|
|
|
|
ElectricBorderAction electric_border_right;
|
|
|
|
ElectricBorderAction electric_border_bottom_right;
|
|
|
|
ElectricBorderAction electric_border_bottom;
|
|
|
|
ElectricBorderAction electric_border_bottom_left;
|
|
|
|
ElectricBorderAction electric_border_left;
|
|
|
|
ElectricBorderAction electric_border_top_left;
|
|
|
|
int electric_borders;
|
|
|
|
int electric_border_delay;
|
|
|
|
int electric_border_cooldown;
|
|
|
|
int electric_border_pushback_pixels;
|
|
|
|
bool electric_border_maximize;
|
|
|
|
bool electric_border_tiling;
|
|
|
|
bool borderless_maximized_windows;
|
|
|
|
bool show_geometry_tip;
|
|
|
|
int animationSpeed; // 0 - instant, 5 - very slow
|
|
|
|
|
2012-02-20 11:29:59 +00:00
|
|
|
MouseCommand wheelToMouseCommand(MouseWheelCommand com, int delta) const;
|
2011-01-30 14:34:42 +00:00
|
|
|
};
|
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
extern Options* options;
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|