From 32ef57aae71d2240ed751c90a803660dddf08777 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 17 May 2009 18:26:49 +0000 Subject: [PATCH] Add bool keepAbove() to EffectWindow svn path=/trunk/KDE/kdebase/workspace/; revision=969232 --- effects.cpp | 8 ++++++++ effects.h | 1 + lib/kwineffects.h | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/effects.cpp b/effects.cpp index f03e0341c7..2ee35ee07a 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1407,6 +1407,14 @@ bool EffectWindowImpl::acceptsFocus() const return client->wantsInput(); } +bool EffectWindowImpl::keepAbove() const + { + const Client* client = dynamic_cast< const Client* >( toplevel ); + if( !client ) + return true; + return client->keepAbove(); + } + bool EffectWindowImpl::isModal() const { if( Client* c = dynamic_cast< Client* >( toplevel )) diff --git a/effects.h b/effects.h index 902924c085..0bf69461fd 100644 --- a/effects.h +++ b/effects.h @@ -250,6 +250,7 @@ class EffectWindowImpl : public EffectWindow virtual bool isDNDIcon() const; virtual bool isManaged() const; // managed or override-redirect virtual bool acceptsFocus() const; + virtual bool keepAbove() const; virtual bool isModal() const; virtual EffectWindow* findModal(); diff --git a/lib/kwineffects.h b/lib/kwineffects.h index 857a447e60..28889cc84d 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -170,7 +170,7 @@ X-KDE-Library=kwin4_effect_cooleffect #define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor )) #define KWIN_EFFECT_API_VERSION_MAJOR 0 -#define KWIN_EFFECT_API_VERSION_MINOR 81 +#define KWIN_EFFECT_API_VERSION_MINOR 82 #define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \ KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR ) @@ -941,6 +941,10 @@ class KWIN_EXPORT EffectWindow * Returns whether or not the window can accept keyboard focus. */ virtual bool acceptsFocus() const = 0; + /** + * Returns whether or not the window is kept above all other windows. + */ + virtual bool keepAbove() const = 0; virtual bool isModal() const = 0; virtual EffectWindow* findModal() = 0;