summaryrefslogtreecommitdiffstats
path: root/twin/options.h
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2023-04-05 22:08:38 +0300
committerMavridis Philippe <mavridisf@gmail.com>2023-05-27 16:32:23 +0300
commit31335a04ed9bc01fd3ede33afde40d6f3359f2e9 (patch)
treec15b7ab30c4af1e4992b908e48921d6c6c7017a8 /twin/options.h
parent3285a47d5dc3ffecabe49aaa11877f1abe71df44 (diff)
downloadtdebase-31335a04ed9bc01fd3ede33afde40d6f3359f2e9.tar.gz
tdebase-31335a04ed9bc01fd3ede33afde40d6f3359f2e9.zip
TWin: Active borders and snap tiling
This commit is a squash of the commits of TDE/tdebase#331. In short, this backports some improvements to existing electric border functionality from KDE, adds the snap tiling (or aerosnap) feature and brings rudimentary support for active corners, which will be fully implemented in a later PR. The options dialog and the documentation has been updated to reflect these changes. Additionally, a new relevant option is introduced: an option for restoring the original size of maximized/tiled windows when the user starts dragging them. The option is set to be off by default, preserving the traditional behaviour of KDE 3.x/TDE. Last but not least, the term "electric" in relation to borders and corners is replaced by "active" for clarity to the users. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'twin/options.h')
-rw-r--r--twin/options.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/twin/options.h b/twin/options.h
index 113e6b9e6..55183e6bd 100644
--- a/twin/options.h
+++ b/twin/options.h
@@ -269,6 +269,13 @@ class Options : public KDecorationOptions
bool showGeometryTip();
/**
+ * @returns true if a maximized or tiled window should be reset to its original
+ * size when dragging it.
+ * @since R14.1.1
+ */
+ bool resetMaximizedWindowGeometry();
+
+ /**
* @returns A TQColor representing the colour that window drop shadows should
* be.
*/
@@ -307,18 +314,22 @@ class Options : public KDecorationOptions
*/
int shadowYOffset(bool active=true);
- enum { ElectricDisabled = 0, ElectricMoveOnly = 1, ElectricAlways = 2 };
+ enum { ActiveDisabled = 0,
+ ActiveSwitchOnMove = 1,
+ ActiveSwitchAlways = 2,
+ ActiveTileOnly = 3,
+ ActiveTileMaximize = 4 };
/**
- * @returns true if electric borders are enabled. With electric borders
+ * @returns true if active borders are enabled. With active borders
* you can change desktop by moving the mouse pointer towards the edge
* of the screen
*/
- int electricBorders();
+ int activeBorders();
/**
- * @returns the activation delay for electric borders in milliseconds.
+ * @returns the activation delay for active borders in milliseconds.
*/
- int electricBorderDelay();
+ int activeBorderDelay();
bool topMenuEnabled() const { return topmenus; }
bool desktopTopMenu() const { return desktop_topmenu; }
@@ -373,9 +384,10 @@ class Options : public KDecorationOptions
bool CmdAllRevWheel;
uint CmdAllModKey;
- int electric_borders;
- int electric_border_delay;
+ int active_borders;
+ int active_border_delay;
bool show_geometry_tip;
+ bool reset_maximized_window_geometry;
bool topmenus;
bool desktop_topmenu;
TQColor shadow_colour;