Make it possible to find out window type also in createDecoration().
svn path=/trunk/kdebase/kwin/; revision=254816icc-effect-5.14.5
parent
c8c1c6c764
commit
81e475c523
|
@ -1,3 +1,3 @@
|
|||
SUBDIRS = test keramik modernsystem default laptop redmond web quartz b2
|
||||
SUBDIRS = keramik modernsystem default laptop redmond web quartz b2
|
||||
#SUBDIRS = default kde1 riscos redmond quartz icewm web b2 \
|
||||
# modernsystem laptop system kwmtheme kstep keramik
|
||||
|
|
|
@ -313,9 +313,12 @@ bool Decoration::animateMinimize(bool iconify)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
KDecoration* Factory::createDecoration( KDecorationBridge* bridge )
|
||||
{
|
||||
NET::WindowType type = windowType( SUPPORTED_WINDOW_TYPES_MASK, bridge );
|
||||
if( type == NET::Dialog )
|
||||
;
|
||||
return new Decoration( bridge, this );
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
namespace KWinTest
|
||||
{
|
||||
|
||||
const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
|
||||
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask
|
||||
| NET::UtilityMask | NET::SplashMask;
|
||||
|
||||
class Decoration
|
||||
: public KDecoration
|
||||
{
|
||||
|
|
|
@ -149,7 +149,7 @@ bool KDecoration::isResizable() const
|
|||
}
|
||||
|
||||
NET::WindowType KDecoration::windowType( unsigned long supported_types ) const
|
||||
{
|
||||
{ // this one is also duplicated in KDecorationFactory
|
||||
return bridge_->windowType( supported_types );
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#include "kdecoration_p.h"
|
||||
|
||||
KDecorationFactory::KDecorationFactory()
|
||||
{
|
||||
}
|
||||
|
@ -67,3 +69,8 @@ void KDecorationFactory::resetDecorations( unsigned long changed )
|
|||
++it )
|
||||
(*it)->reset( changed );
|
||||
}
|
||||
|
||||
NET::WindowType KDecorationFactory::windowType( unsigned long supported_types, KDecorationBridge* bridge ) const
|
||||
{
|
||||
return bridge->windowType( supported_types );
|
||||
}
|
||||
|
|
|
@ -91,6 +91,14 @@ class KDecorationFactory
|
|||
* objects.
|
||||
*/
|
||||
void resetDecorations( unsigned long changed ); // convenience
|
||||
/**
|
||||
* This function has the same functionality like KDecoration::windowType().
|
||||
* It can be used in createDecoration() to return different KDecoration
|
||||
* inherited classes depending on the window type, as at that time
|
||||
* KDecoration::windowType() is not available yet. The additional argument
|
||||
* is the one passed to createDecoration().
|
||||
*/
|
||||
NET::WindowType windowType( unsigned long supported_types, KDecorationBridge* bridge ) const;
|
||||
private:
|
||||
QValueList< KDecoration* > _decorations;
|
||||
KDecorationFactoryPrivate* d;
|
||||
|
|
Loading…
Reference in New Issue