Move WindowOperation enum to Options
With this Options no longer needs to inherit from KDecorationDefines.icc-effect-5.14.5
parent
b9fb7df15a
commit
d4bf3602ce
2
client.h
2
client.h
|
@ -483,7 +483,7 @@ public:
|
|||
const QKeySequence &shortcut() const;
|
||||
void setShortcut(const QString& cut);
|
||||
|
||||
WindowOperation mouseButtonToWindowOperation(Qt::MouseButtons button);
|
||||
Options::WindowOperation mouseButtonToWindowOperation(Qt::MouseButtons button);
|
||||
bool performMouseCommand(Options::MouseCommand, const QPoint& globalPos);
|
||||
|
||||
QRect adjustedClientArea(const QRect& desktop, const QRect& area) const;
|
||||
|
|
|
@ -142,7 +142,7 @@ DELEGATE(WId, decorationId, frameId)
|
|||
#define DELEGATE(name, op) \
|
||||
void DecoratedClientImpl::name() \
|
||||
{ \
|
||||
Workspace::self()->performWindowOperation(m_client, KDecorationDefines::op); \
|
||||
Workspace::self()->performWindowOperation(m_client, Options::op); \
|
||||
}
|
||||
|
||||
DELEGATE(requestToggleShade, ShadeOp)
|
||||
|
|
|
@ -1155,7 +1155,7 @@ double Options::animationTimeFactor() const
|
|||
return factors[ animationSpeed ];
|
||||
}
|
||||
|
||||
KDecorationDefines::WindowOperation Options::operationMaxButtonClick(Qt::MouseButtons button) const
|
||||
Options::WindowOperation Options::operationMaxButtonClick(Qt::MouseButtons button) const
|
||||
{
|
||||
return button == Qt::RightButton ? opMaxButtonRightClick :
|
||||
button == Qt::MidButton ? opMaxButtonMiddleClick :
|
||||
|
|
36
options.h
36
options.h
|
@ -47,13 +47,14 @@ enum HiddenPreviews {
|
|||
|
||||
class Settings;
|
||||
|
||||
class Options : public QObject, public KDecorationDefines
|
||||
class Options : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(FocusPolicy)
|
||||
Q_ENUMS(GlSwapStrategy)
|
||||
Q_ENUMS(MouseCommand)
|
||||
Q_ENUMS(MouseWheelCommand)
|
||||
Q_ENUMS(WindowOperation)
|
||||
|
||||
Q_PROPERTY(FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy NOTIFY focusPolicyChanged)
|
||||
Q_PROPERTY(bool nextFocusPrefersMouse READ isNextFocusPrefersMouse WRITE setNextFocusPrefersMouse NOTIFY nextFocusPrefersMouseChanged)
|
||||
|
@ -347,6 +348,37 @@ public:
|
|||
return m_legacyFullscreenSupport;
|
||||
}
|
||||
|
||||
enum WindowOperation {
|
||||
MaximizeOp = 5000,
|
||||
RestoreOp,
|
||||
MinimizeOp,
|
||||
MoveOp,
|
||||
UnrestrictedMoveOp,
|
||||
ResizeOp,
|
||||
UnrestrictedResizeOp,
|
||||
CloseOp,
|
||||
OnAllDesktopsOp,
|
||||
ShadeOp,
|
||||
KeepAboveOp,
|
||||
KeepBelowOp,
|
||||
OperationsOp,
|
||||
WindowRulesOp,
|
||||
ToggleStoreSettingsOp = WindowRulesOp, ///< @obsolete
|
||||
HMaximizeOp,
|
||||
VMaximizeOp,
|
||||
LowerOp,
|
||||
FullScreenOp,
|
||||
NoBorderOp,
|
||||
NoOp,
|
||||
SetupWindowShortcutOp,
|
||||
ApplicationRulesOp,
|
||||
RemoveTabFromGroupOp, // Remove from group
|
||||
CloseTabGroupOp, // Close the group
|
||||
ActivateNextTabOp, // Move left in the group
|
||||
ActivatePreviousTabOp, // Move right in the group
|
||||
TabDragOp,
|
||||
};
|
||||
|
||||
WindowOperation operationTitlebarDblClick() const {
|
||||
return OpTitlebarDblClick;
|
||||
}
|
||||
|
@ -914,4 +946,6 @@ extern Options* options;
|
|||
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(KWin::Options::WindowOperation)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -740,7 +740,7 @@ void UserActionsMenu::slotWindowOperation(QAction *action)
|
|||
QMetaObject::invokeMethod(workspace(), "performWindowOperation",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(KWin::Client*, c.data()),
|
||||
Q_ARG(KDecorationDefines::WindowOperation, op));
|
||||
Q_ARG(Options::WindowOperation, op));
|
||||
}
|
||||
|
||||
void UserActionsMenu::slotSendToDesktop(QAction *action)
|
||||
|
|
|
@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// kwin
|
||||
#include <kdecoration.h>
|
||||
#include "sm.h"
|
||||
#include "options.h"
|
||||
#include "utils.h"
|
||||
// Qt
|
||||
#include <QTimer>
|
||||
|
@ -330,7 +331,7 @@ public:
|
|||
void unregisterEventFilter(X11EventFilter *filter);
|
||||
|
||||
public Q_SLOTS:
|
||||
void performWindowOperation(KWin::Client* c, KDecorationDefines::WindowOperation op);
|
||||
void performWindowOperation(KWin::Client* c, Options::WindowOperation op);
|
||||
// Keybindings
|
||||
//void slotSwitchToWindow( int );
|
||||
void slotWindowToDesktop();
|
||||
|
|
Loading…
Reference in New Issue