Support new compositing window types.

svn path=/branches/work/kwin_composite/; revision=636642
This commit is contained in:
Luboš Luňák 2007-02-23 17:41:49 +00:00
parent 5f02d68fb9
commit 4affacac5b
2 changed files with 38 additions and 1 deletions

View file

@ -56,6 +56,12 @@ class Toplevel
bool isDialog() const;
bool isSplash() const;
bool isUtility() const;
bool isDropdownMenu() const;
bool isPopupMenu() const; // a context popup, not dropdown, not torn-off
bool isTooltip() const;
bool isNotification() const;
bool isComboBox() const;
bool isDNDIcon() const;
virtual int desktop() const = 0;
bool isOnDesktop( int d ) const;
@ -250,6 +256,36 @@ inline bool Toplevel::isNormalWindow() const
return windowType() == NET::Normal;
}
inline bool Toplevel::isDropdownMenu() const
{
return windowType() == NET::DropdownMenu;
}
inline bool Toplevel::isPopupMenu() const
{
return windowType() == NET::PopupMenu;
}
inline bool Toplevel::isTooltip() const
{
return windowType() == NET::Tooltip;
}
inline bool Toplevel::isNotification() const
{
return windowType() == NET::Notification;
}
inline bool Toplevel::isComboBox() const
{
return windowType() == NET::ComboBox;
}
inline bool Toplevel::isDNDIcon() const
{
return windowType() == NET::DNDIcon;
}
inline Pixmap Toplevel::windowPixmap( bool allow_create )
{
if( window_pix == None && allow_create )

View file

@ -58,7 +58,8 @@ struct XDamageNotifyEvent
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;
| NET::UtilityMask | NET::SplashMask | NET::DropdownMenuMask | NET::PopupMenuMask
| NET::TooltipMask | NET::NotificationMask | NET::ComboBoxMask | NET::DNDIconMask;
const long ClientWinMask = KeyPressMask | KeyReleaseMask |
ButtonPressMask | ButtonReleaseMask |