From 11a496c359b8d2d87433f5cb2b06545a08d001d5 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 18 Aug 2021 18:27:33 +0900 Subject: Added checkbox to invert mouse wheel direction in window's titlebar and frame actions. This resolves issue TDE/tde#64. Signed-off-by: Michele Calgaro --- twin/options.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'twin/options.h') diff --git a/twin/options.h b/twin/options.h index 2c5341f81..113e6b9e6 100644 --- a/twin/options.h +++ b/twin/options.h @@ -25,7 +25,7 @@ namespace KWinInternal class Client; -class Options : public KDecorationOptions +class Options : public KDecorationOptions { public: @@ -124,7 +124,7 @@ class Options : public KDecorationOptions */ enum AltTabStyle { KDE, CDE }; AltTabStyle altTabStyle; - + // whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) bool separateScreenFocus; // whether active Xinerama screen is the one with mouse (or with the active window) @@ -138,7 +138,7 @@ class Options : public KDecorationOptions bool xineramaMovementEnabled; bool xineramaMaximizeEnabled; bool xineramaFullscreenEnabled; - + // number, or -1 = active screen (Workspace::activeScreen()) int xineramaPlacementScreen; @@ -149,13 +149,13 @@ class Options : public KDecorationOptions MoveResizeMode resizeMode; MoveResizeMode moveMode; - + static MoveResizeMode stringToMoveResizeMode( const TQString& s ); static const char* moveResizeModeToString( MoveResizeMode mode ); Placement::Policy placement; - bool focusPolicyIsReasonable() + bool focusPolicyIsReasonable() { return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse; } @@ -190,7 +190,7 @@ class Options : public KDecorationOptions * Animation speed (0 .. 10 ) */ int animateMinimizeSpeed; - + bool showDesktopIsMinimizeAll; /** @@ -205,12 +205,12 @@ class Options : public KDecorationOptions * List of window classes to ignore PPosition size hint */ TQStringList ignorePositionClasses; - + bool checkIgnoreFocusStealing( const Client* c ); WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; } - enum MouseCommand + enum MouseCommand { MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower, MouseActivateAndRaise, MouseActivateAndLower, MouseActivate, @@ -225,7 +225,7 @@ class Options : public KDecorationOptions MouseOpacityMore, MouseOpacityLess, MouseNothing }; - + enum MouseWheelCommand { MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore, @@ -236,11 +236,11 @@ class Options : public KDecorationOptions MouseCommand operationTitlebarMouseWheel( int delta ) { - return wheelToMouseCommand( CmdTitlebarWheel, delta ); + return wheelToMouseCommand( CmdTitlebarWheel, delta, CmdTitlebarRevWheel ); } MouseCommand operationWindowMouseWheel( int delta ) { - return wheelToMouseCommand( CmdAllWheel, delta ); + return wheelToMouseCommand( CmdAllWheel, delta, CmdAllRevWheel ); } MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; } @@ -319,13 +319,13 @@ class Options : public KDecorationOptions * @returns the activation delay for electric borders in milliseconds. */ int electricBorderDelay(); - + bool topMenuEnabled() const { return topmenus; } bool desktopTopMenu() const { return desktop_topmenu; } - + // timeout before non-responding application will be killed after attempt to close int killPingTimeout; - + // Whether to hide utility windows for inactive applications. bool hideUtilityWindowsForInactive; @@ -362,6 +362,7 @@ class Options : public KDecorationOptions MouseCommand CmdInactiveTitlebar2; MouseCommand CmdInactiveTitlebar3; MouseWheelCommand CmdTitlebarWheel; + bool CmdTitlebarRevWheel; MouseCommand CmdWindow1; MouseCommand CmdWindow2; MouseCommand CmdWindow3; @@ -369,6 +370,7 @@ class Options : public KDecorationOptions MouseCommand CmdAll2; MouseCommand CmdAll3; MouseWheelCommand CmdAllWheel; + bool CmdAllRevWheel; uint CmdAllModKey; int electric_borders; @@ -395,7 +397,7 @@ class Options : public KDecorationOptions // List of window classes for which not to use focus stealing prevention TQStringList ignoreFocusStealingClasses; - MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta ); + MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta, bool revDir ); }; extern Options* options; -- cgit v1.2.1