Make a clear distinction between types we support only for compositing

and types that are actually supported when managing windows.


svn path=/trunk/KDE/kdebase/workspace/; revision=746036
This commit is contained in:
Luboš Luňák 2007-12-07 15:53:43 +00:00
parent 1df5accf3e
commit 3b2b091c34
6 changed files with 15 additions and 5 deletions

View file

@ -434,7 +434,7 @@ void Client::detectNoBorder()
// NET::Override is some strange beast without clear definition, usually
// just meaning "noborder", so let's treat it only as such flag, and ignore it as
// a window type otherwise (SUPPORTED_WINDOW_TYPES_MASK doesn't include it)
if( info->windowType( SUPPORTED_WINDOW_TYPES_MASK | NET::OverrideMask ) == NET::Override )
if( info->windowType( SUPPORTED_MANAGED_WINDOW_TYPES_MASK | NET::OverrideMask ) == NET::Override )
noborder = true;
}

View file

@ -630,7 +630,7 @@ void RulesWidget::prefillUnusedValues( const KWindowInfo& info )
//LINEEDIT_PREFILL( shortcut, );
//COMBOBOX_PREFILL( fsplevel, );
//COMBOBOX_PREFILL( moveresizemode, moveresizeToCombo );
COMBOBOX_PREFILL( type, typeToCombo, info.windowType( SUPPORTED_WINDOW_TYPES_MASK ) );
COMBOBOX_PREFILL( type, typeToCombo, info.windowType( SUPPORTED_MANAGED_WINDOW_TYPES_MASK ) );
//CHECKBOX_PREFILL( ignoreposition, );
LINEEDIT_PREFILL( minsize, sizeToStr, info.frameGeometry().size() );
LINEEDIT_PREFILL( maxsize, sizeToStr, info.frameGeometry().size() );

View file

@ -142,6 +142,9 @@ void Toplevel::disownDataPassedToDeleted()
NET::WindowType Toplevel::windowType( bool direct, int supported_types ) const
{
if( supported_types == 0 )
supported_types = dynamic_cast< const Client* >( this ) != NULL
? SUPPORTED_MANAGED_WINDOW_TYPES_MASK : SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK;
NET::WindowType wt = info->windowType( supported_types );
if( direct )
return wt;

View file

@ -63,8 +63,9 @@ class Toplevel
virtual QPoint clientPos() const = 0; // inside of geometry()
virtual QSize clientSize() const = 0;
// prefer isXXX() instead
NET::WindowType windowType( bool direct = false, int supported_types = SUPPORTED_WINDOW_TYPES_MASK ) const;
// prefer isXXX() instead
// 0 for supported types means default for managed/unmanaged types
NET::WindowType windowType( bool direct = false, int supported_types = 0 ) const;
bool hasNETSupport() const;
bool isDesktop() const;
bool isDock() const;

View file

@ -51,7 +51,12 @@ struct XDamageNotifyEvent
};
#endif
const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
// window types that are supported as normal windows (i.e. KWin actually manages them)
const int SUPPORTED_MANAGED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
| NET::UtilityMask | NET::SplashMask;
// window types that are supported as unmanaged (mainly for compositing)
const int SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
| NET::UtilityMask | NET::SplashMask | NET::DropdownMenuMask | NET::PopupMenuMask
| NET::TooltipMask | NET::NotificationMask | NET::ComboBoxMask | NET::DNDIconMask;

View file

@ -272,6 +272,7 @@ void Workspace::init()
NET::TopMenuMask |
NET::UtilityMask |
NET::SplashMask |
// No compositing window types here unless we support them also as managed window types
0
,
NET::Modal |