From 4affacac5bff8a96294f3e080fd8b34aac16d98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 23 Feb 2007 17:41:49 +0000 Subject: [PATCH] Support new compositing window types. svn path=/branches/work/kwin_composite/; revision=636642 --- toplevel.h | 36 ++++++++++++++++++++++++++++++++++++ utils.h | 3 ++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/toplevel.h b/toplevel.h index b3f3dec0d7..04240ca4cd 100644 --- a/toplevel.h +++ b/toplevel.h @@ -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 ) diff --git a/utils.h b/utils.h index b7114b240c..83c6aec136 100644 --- a/utils.h +++ b/utils.h @@ -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 |