findWindow()

svn path=/trunk/KDE/kdebase/workspace/; revision=755996
icc-effect-5.14.5
Luboš Luňák 2008-01-02 15:37:46 +00:00
parent 82ad4e01ce
commit c708796804
3 changed files with 13 additions and 1 deletions

View File

@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "group.h"
#include "scene_xrender.h"
#include "scene_opengl.h"
#include "unmanaged.h"
#include "workspace.h"
#include "kwinglutils.h"
@ -429,6 +430,15 @@ int EffectsHandlerImpl::displayHeight() const
return KWin::displayWidth();
}
EffectWindow* EffectsHandlerImpl::findWindow( WId id ) const
{
if( Client* w = Workspace::self()->findClient( WindowMatchPredicate( id )))
return w->effectWindow();
if( Unmanaged* w = Workspace::self()->findUnmanaged( WindowMatchPredicate( id )))
return w->effectWindow();
return NULL;
}
EffectWindowList EffectsHandlerImpl::stackingOrder() const
{
ClientList list = Workspace::self()->stackingOrder();

View File

@ -63,6 +63,7 @@ class EffectsHandlerImpl : public EffectsHandler
virtual QPoint cursorPos() const;
virtual bool grabKeyboard( Effect* effect );
virtual void ungrabKeyboard();
virtual EffectWindow* findWindow( WId id ) const;
virtual EffectWindowList stackingOrder() const;
virtual void setElevatedWindow( EffectWindow* w, bool set );

View File

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor ))
#define KWIN_EFFECT_API_VERSION_MAJOR 0
#define KWIN_EFFECT_API_VERSION_MINOR 4
#define KWIN_EFFECT_API_VERSION_MINOR 5
#define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \
KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR )
@ -381,6 +381,7 @@ class KWIN_EXPORT EffectsHandler
virtual int desktopUp( int desktop, bool wrap ) const = 0;
virtual int desktopDown( int desktop, bool wrap ) const = 0;
virtual EffectWindow* findWindow( WId id ) const = 0;
virtual EffectWindowList stackingOrder() const = 0;
// window will be temporarily painted as if being at the top of the stack
virtual void setElevatedWindow( EffectWindow* w, bool set ) = 0;