From 3fb48016359b0f0e090155f9abe420b82c15db03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 8 Aug 2005 14:27:03 +0000 Subject: [PATCH] Ignore requested position -> geometry. svn path=/trunk/KDE/kdebase/kwin/; revision=444049 --- kcmkwin/kwinrules/ruleswidgetbase.ui | 2 +- manage.cpp | 2 +- rules.cpp | 13 +++++++++++++ rules.h | 6 ++++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/kcmkwin/kwinrules/ruleswidgetbase.ui b/kcmkwin/kwinrules/ruleswidgetbase.ui index 222b598606..8602c801b5 100644 --- a/kcmkwin/kwinrules/ruleswidgetbase.ui +++ b/kcmkwin/kwinrules/ruleswidgetbase.ui @@ -2231,7 +2231,7 @@ enable_ignoreposition - Ignore requested &position + Ignore requested &geometry diff --git a/manage.cpp b/manage.cpp index 82ae57cac4..d0279b6b4c 100644 --- a/manage.cpp +++ b/manage.cpp @@ -250,7 +250,7 @@ bool Client::manage( Window w, bool isMapped ) ; // force using placement policy else usePosition = true; - if( !rules()->checkIgnorePosition( !usePosition )) + if( !rules()->checkIgnoreGeometry( !usePosition )) { bool ignorePPosition = ( options->ignorePositionClasses.contains(QString::fromLatin1(resourceClass()))); diff --git a/rules.cpp b/rules.cpp index 65f3297beb..6224fb6aca 100644 --- a/rules.cpp +++ b/rules.cpp @@ -565,6 +565,13 @@ APPLY_FORCE_RULE( maxsize, MaxSize, QSize ) APPLY_FORCE_RULE( opacityactive, OpacityActive, int ) APPLY_FORCE_RULE( opacityinactive, OpacityInactive, int ) APPLY_FORCE_RULE( ignoreposition, IgnorePosition, bool ) + +// the cfg. entry needs to stay named the say for backwards compatibility +bool Rules::applyIgnoreGeometry( bool& ignore ) const + { + return applyIgnorePosition( ignore ); + } + APPLY_RULE( desktop, Desktop, int ) APPLY_FORCE_RULE( type, Type, NET::WindowType ) @@ -760,6 +767,12 @@ CHECK_FORCE_RULE( MaxSize, QSize ) CHECK_FORCE_RULE( OpacityActive, int ) CHECK_FORCE_RULE( OpacityInactive, int ) CHECK_FORCE_RULE( IgnorePosition, bool ) + +bool WindowRules::checkIgnoreGeometry( bool ignore ) const + { + return checkIgnorePosition( ignore ); + } + CHECK_RULE( Desktop, int ) CHECK_FORCE_RULE( Type, NET::WindowType ) CHECK_RULE( MaximizeVert, KDecorationDefines::MaximizeMode ) diff --git a/rules.h b/rules.h index c39df91ffd..78a1faee53 100644 --- a/rules.h +++ b/rules.h @@ -50,7 +50,7 @@ class WindowRules QSize checkMaxSize( QSize s ) const; int checkOpacityActive(int s) const; int checkOpacityInactive(int s) const; - bool checkIgnorePosition( bool ignore ) const; + bool checkIgnoreGeometry( bool ignore ) const; int checkDesktop( int desktop, bool init = false ) const; NET::WindowType checkType( NET::WindowType type ) const; MaximizeMode checkMaximize( MaximizeMode mode, bool init = false ) const; @@ -69,6 +69,7 @@ class WindowRules bool checkStrictGeometry( bool strict ) const; QString checkShortcut( QString s, bool init = false ) const; bool checkDisableGlobalShortcuts( bool disable ) const; + bool checkIgnorePosition( bool ignore ) const; // obsolete private: MaximizeMode checkMaximizeVert( MaximizeMode mode, bool init ) const; MaximizeMode checkMaximizeHoriz( MaximizeMode mode, bool init ) const; @@ -100,7 +101,7 @@ class Rules bool applyMaxSize( QSize& s ) const; bool applyOpacityActive(int& s) const; bool applyOpacityInactive(int& s) const; - bool applyIgnorePosition( bool& ignore ) const; + bool applyIgnoreGeometry( bool& ignore ) const; bool applyDesktop( int& desktop, bool init ) const; bool applyType( NET::WindowType& type ) const; bool applyMaximizeVert( MaximizeMode& mode, bool init ) const; @@ -120,6 +121,7 @@ class Rules bool applyStrictGeometry( bool& strict ) const; bool applyShortcut( QString& shortcut, bool init ) const; bool applyDisableGlobalShortcuts( bool& disable ) const; + bool applyIgnorePosition( bool& ignore ) const; // obsolete private: #endif bool matchType( NET::WindowType match_type ) const;