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