diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2023-07-09 17:01:04 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2023-07-10 12:10:54 +0300 |
commit | bb44b9863c49c05e5d2d761e65981853ed42adcd (patch) | |
tree | 14222a2223926bd98b908ca8286c7dcb2289fca3 /twin/utils.h | |
parent | 84c43976446c4694049cc6439e961b718bc84fca (diff) | |
download | tdebase-bb44b9863c49c05e5d2d761e65981853ed42adcd.tar.gz tdebase-bb44b9863c49c05e5d2d761e65981853ed42adcd.zip |
twin: Minor code cleanup and refactoring
Refactoring concerns active border code.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
(cherry picked from commit 0339423ced3db53f9155c6c174d9508517358f9c)
Diffstat (limited to 'twin/utils.h')
-rw-r--r-- | twin/utils.h | 31 |
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; |