summaryrefslogtreecommitdiffstats
path: root/twin/utils.h
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2023-07-09 17:01:04 +0300
committerMavridis Philippe <[email protected]>2023-07-10 11:39:55 +0300
commit0339423ced3db53f9155c6c174d9508517358f9c (patch)
tree50010eac860f76137c71f3fb9f04498130812159 /twin/utils.h
parentbecae3055bfd5da737f63d5558695030db91a3a9 (diff)
downloadtdebase-0339423ced3db53f9155c6c174d9508517358f9c.tar.gz
tdebase-0339423ced3db53f9155c6c174d9508517358f9c.zip
twin: Minor code cleanup and refactoring
Refactoring concerns active border code. Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'twin/utils.h')
-rw-r--r--twin/utils.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/twin/utils.h b/twin/utils.h
index e2e6e2a31..f1c1e772e 100644
--- a/twin/utils.h
+++ b/twin/utils.h
@@ -110,16 +110,19 @@ enum ShadeMode
enum ActiveBorder
{
- ActiveTop,
- ActiveTopRight,
- ActiveRight,
- ActiveBottomRight,
- ActiveBottom,
- ActiveBottomLeft,
- ActiveLeft,
- ActiveTopLeft,
- ACTIVE_BORDER_COUNT,
- ActiveNone
+ ActiveNone = 0,
+
+ ActiveLeft = 1,
+ ActiveRight = 2,
+ ActiveTop = 4,
+ ActiveBottom = 8,
+
+ ActiveTopLeft = ActiveTop | ActiveLeft,
+ ActiveTopRight = ActiveTop | ActiveRight,
+ ActiveBottomLeft = ActiveBottom | ActiveLeft,
+ ActiveBottomRight = ActiveBottom | ActiveRight,
+
+ ACTIVE_BORDER_COUNT
};
enum ActiveMaximizingMode
@@ -129,7 +132,7 @@ enum ActiveMaximizingMode
ActiveMaximizeMode
};
-class Shape
+class Shape
{
public:
static bool available() { return twin_shape_version > 0; }
@@ -147,12 +150,12 @@ class Shape
const int ShapeInput = 2;
#endif
-class Motif
+class Motif
{
public:
static void readFlags( WId w, bool& noborder, bool& resize, bool& move,
bool& minimize, bool& maximize, bool& close );
- struct MwmHints
+ struct MwmHints
{
ulong flags;
ulong functions;
@@ -248,7 +251,7 @@ KWIN_CHECK_PREDICATE( TruePredicate, cl == cl /*true, avoid warning about 'cl' *
template< typename T >
Client* findClientInList( const ClientList& list, T predicate )
{
- for ( ClientList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for ( ClientList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if ( predicate( const_cast< const Client* >( *it)))
return *it;