diff --git a/client.cpp b/client.cpp index 3a085920fd..bdcef8e554 100644 --- a/client.cpp +++ b/client.cpp @@ -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; } diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index b516c1b29c..8047f87ede 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -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() ); diff --git a/toplevel.cpp b/toplevel.cpp index c1edcf1d1e..cdf72cdc72 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -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; diff --git a/toplevel.h b/toplevel.h index b3ce73b8a6..6df7e8fac9 100644 --- a/toplevel.h +++ b/toplevel.h @@ -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; diff --git a/utils.h b/utils.h index dfa1c0caa5..09b7bb5206 100644 --- a/utils.h +++ b/utils.h @@ -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; diff --git a/workspace.cpp b/workspace.cpp index 9e5ed965ca..d5589afef6 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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 |