EffectWindow becomes a QObject
This commit is contained in:
parent
1ed900552b
commit
3c59983589
5 changed files with 12 additions and 11 deletions
|
@ -529,8 +529,7 @@ void Toplevel::setupCompositing()
|
|||
return;
|
||||
damage_handle = XDamageCreate(display(), frameId(), XDamageReportRawRectangles);
|
||||
damage_region = QRegion(0, 0, width(), height());
|
||||
effect_window = new EffectWindowImpl();
|
||||
effect_window->setWindow(this);
|
||||
effect_window = new EffectWindowImpl(this);
|
||||
unredirect = false;
|
||||
workspace()->checkUnredirect(true);
|
||||
scene->windowAdded(this);
|
||||
|
|
|
@ -1325,10 +1325,9 @@ void EffectsHandlerImpl::slotHideOutline()
|
|||
// EffectWindowImpl
|
||||
//****************************************
|
||||
|
||||
EffectWindowImpl::EffectWindowImpl()
|
||||
: QObject(NULL)
|
||||
, EffectWindow()
|
||||
, toplevel(NULL)
|
||||
EffectWindowImpl::EffectWindowImpl(Toplevel *toplevel)
|
||||
: EffectWindow(toplevel)
|
||||
, toplevel(toplevel)
|
||||
, sw(NULL)
|
||||
{
|
||||
}
|
||||
|
@ -1465,6 +1464,7 @@ void EffectWindowImpl::unrefWindow()
|
|||
void EffectWindowImpl::setWindow(Toplevel* w)
|
||||
{
|
||||
toplevel = w;
|
||||
setParent(w);
|
||||
}
|
||||
|
||||
void EffectWindowImpl::setSceneWindow(Scene::Window* w)
|
||||
|
|
|
@ -224,11 +224,11 @@ private:
|
|||
QList< Effect* >::iterator m_currentBuildQuadsIterator;
|
||||
};
|
||||
|
||||
class EffectWindowImpl : public QObject, public EffectWindow
|
||||
class EffectWindowImpl : public EffectWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectWindowImpl();
|
||||
EffectWindowImpl(Toplevel *toplevel);
|
||||
virtual ~EffectWindowImpl();
|
||||
|
||||
virtual void enablePainting(int reason);
|
||||
|
|
|
@ -282,7 +282,8 @@ EffectsHandler* effects = 0;
|
|||
// EffectWindow
|
||||
//****************************************
|
||||
|
||||
EffectWindow::EffectWindow()
|
||||
EffectWindow::EffectWindow(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1067,8 +1067,9 @@ protected:
|
|||
* The purpose is to hide internal data and also to serve as a single
|
||||
* representation for the case when Client/Unmanaged becomes Deleted.
|
||||
**/
|
||||
class KWIN_EXPORT EffectWindow
|
||||
class KWIN_EXPORT EffectWindow : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/** Flags explaining why painting should be disabled */
|
||||
enum {
|
||||
|
@ -1086,7 +1087,7 @@ public:
|
|||
PAINT_DISABLED_BY_ACTIVITY = 1 << 5
|
||||
};
|
||||
|
||||
EffectWindow();
|
||||
EffectWindow(QObject *parent = NULL);
|
||||
virtual ~EffectWindow();
|
||||
|
||||
virtual void enablePainting(int reason) = 0;
|
||||
|
|
Loading…
Reference in a new issue