EffectsHandler emits windowDeleted signal
Workspace emits a deletedRemoved signal which the EffectsHandlerImpl translates into a windowDeleted signal.
This commit is contained in:
parent
0795ae89ac
commit
e355700e6e
36 changed files with 71 additions and 46 deletions
|
@ -100,6 +100,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(CompositingType type)
|
|||
connect(ws, SIGNAL(clientAdded(KWin::Client*)), this, SLOT(slotClientAdded(KWin::Client*)));
|
||||
connect(ws, SIGNAL(unmanagedAdded(KWin::Unmanaged*)), this, SLOT(slotUnmanagedAdded(KWin::Unmanaged*)));
|
||||
connect(ws, SIGNAL(clientActivated(KWin::Client*)), this, SLOT(slotClientActivated(KWin::Client*)));
|
||||
connect(ws, SIGNAL(deletedRemoved(KWin::Deleted*)), this, SLOT(slotDeletedRemoved(KWin::Deleted*)));
|
||||
// connect all clients
|
||||
foreach (Client *c, ws->clientList()) {
|
||||
connect(c, SIGNAL(clientClosed(KWin::Client*)), this, SLOT(slotClientClosed(KWin::Client*)));
|
||||
|
@ -303,11 +304,10 @@ void EffectsHandlerImpl::slotUnmanagedAdded(Unmanaged *u)
|
|||
emit windowAdded(u->effectWindow());
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::windowDeleted(EffectWindow* c)
|
||||
void EffectsHandlerImpl::slotDeletedRemoved(KWin::Deleted *d)
|
||||
{
|
||||
foreach (const EffectPair & ep, loaded_effects)
|
||||
ep.second->windowDeleted(c);
|
||||
elevated_windows.removeAll(c);
|
||||
emit windowDeleted(d->effectWindow());
|
||||
elevated_windows.removeAll(d->effectWindow());
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::slotClientClosed(Client *c)
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace KWin
|
|||
{
|
||||
|
||||
class Client;
|
||||
class Deleted;
|
||||
class Unmanaged;
|
||||
|
||||
class EffectsHandlerImpl : public EffectsHandler
|
||||
|
@ -160,7 +161,6 @@ public:
|
|||
void windowUserMovedResized(EffectWindow* c, bool first, bool last);
|
||||
void windowMoveResizeGeometryUpdate(EffectWindow* c, const QRect& geometry);
|
||||
void windowOpacityChanged(EffectWindow* c, double old_opacity);
|
||||
void windowDeleted(EffectWindow* c);
|
||||
void windowMinimized(EffectWindow* c);
|
||||
void windowUnminimized(EffectWindow* c);
|
||||
void clientGroupItemSwitched(EffectWindow* from, EffectWindow* to);
|
||||
|
@ -198,6 +198,7 @@ protected Q_SLOTS:
|
|||
void slotClientClosed(KWin::Client *c);
|
||||
void slotUnmanagedClosed(KWin::Unmanaged *u);
|
||||
void slotClientActivated(KWin::Client *c);
|
||||
void slotDeletedRemoved(KWin::Deleted *d);
|
||||
|
||||
protected:
|
||||
KLibrary* findEffectLibrary(KService* service);
|
||||
|
|
|
@ -75,6 +75,7 @@ DesktopGridEffect::DesktopGridEffect()
|
|||
connect(a, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(globalShortcutChanged(QKeySequence)));
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
|
||||
// Load all other configuration details
|
||||
reconfigure(ReconfigureAll);
|
||||
|
@ -425,7 +426,7 @@ void DesktopGridEffect::slotWindowClosed(EffectWindow* w)
|
|||
effects->addRepaintFull();
|
||||
}
|
||||
|
||||
void DesktopGridEffect::windowDeleted(EffectWindow* w)
|
||||
void DesktopGridEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
for (QHash< DesktopButtonsView*, EffectWindow*>::iterator it = m_desktopButtonsViews.begin();
|
||||
it != m_desktopButtonsViews.end(); ++it) {
|
||||
|
|
|
@ -71,7 +71,6 @@ public:
|
|||
virtual void postPaintScreen();
|
||||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void windowDeleted(EffectWindow* w);
|
||||
virtual void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
||||
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
||||
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
||||
|
@ -89,6 +88,7 @@ private slots:
|
|||
void slotRemoveDesktop();
|
||||
void slotWindowAdded(EffectWindow* w);
|
||||
void slotWindowClosed(EffectWindow *w);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
QPointF scalePos(const QPoint& pos, int desktop, int screen = -1) const;
|
||||
|
|
|
@ -36,6 +36,7 @@ DimInactiveEffect::DimInactiveEffect()
|
|||
active = effects->activeWindow();
|
||||
previousActive = NULL;
|
||||
connect(effects, SIGNAL(windowActivated(EffectWindow*)), this, SLOT(slotWindowActivated(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
void DimInactiveEffect::reconfigure(ReconfigureFlags)
|
||||
|
@ -100,7 +101,7 @@ bool DimInactiveEffect::dimWindow(const EffectWindow* w) const
|
|||
return true; // dim the rest
|
||||
}
|
||||
|
||||
void DimInactiveEffect::windowDeleted(EffectWindow* w)
|
||||
void DimInactiveEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
if (w == previousActive)
|
||||
previousActive = NULL;
|
||||
|
|
|
@ -38,10 +38,10 @@ public:
|
|||
virtual void reconfigure(ReconfigureFlags);
|
||||
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
|
||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void windowDeleted(EffectWindow* w);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowActivated(EffectWindow* c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
bool dimWindow(const EffectWindow* w) const;
|
||||
|
|
|
@ -47,6 +47,7 @@ ExplosionEffect::ExplosionEffect() : Effect()
|
|||
mValid = true;
|
||||
mInited = false;
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
ExplosionEffect::~ExplosionEffect()
|
||||
|
@ -194,7 +195,7 @@ void ExplosionEffect::slotWindowClosed(EffectWindow* c)
|
|||
}
|
||||
}
|
||||
|
||||
void ExplosionEffect::windowDeleted(EffectWindow* c)
|
||||
void ExplosionEffect::slotWindowDeleted(EffectWindow* c)
|
||||
{
|
||||
mWindows.remove(c);
|
||||
}
|
||||
|
|
|
@ -48,12 +48,11 @@ public:
|
|||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintScreen();
|
||||
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
|
||||
static bool supported();
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowClosed(EffectWindow *c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
protected:
|
||||
bool loadData();
|
||||
|
|
|
@ -32,6 +32,7 @@ FadeEffect::FadeEffect()
|
|||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
void FadeEffect::reconfigure(ReconfigureFlags)
|
||||
|
@ -176,7 +177,7 @@ void FadeEffect::slotWindowClosed(EffectWindow* w)
|
|||
w->addRepaintFull();
|
||||
}
|
||||
|
||||
void FadeEffect::windowDeleted(EffectWindow* w)
|
||||
void FadeEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
windows.remove(w);
|
||||
}
|
||||
|
|
|
@ -39,13 +39,13 @@ public:
|
|||
|
||||
// TODO react also on virtual desktop changes
|
||||
virtual void windowOpacityChanged(EffectWindow* c, double old_opacity);
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
|
||||
bool isFadeWindow(EffectWindow* w);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow* c);
|
||||
void slotWindowClosed(EffectWindow *c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
private:
|
||||
class WindowInfo;
|
||||
QHash< const EffectWindow*, WindowInfo > windows;
|
||||
|
|
|
@ -33,6 +33,7 @@ FallApartEffect::FallApartEffect()
|
|||
{
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
void FallApartEffect::reconfigure(ReconfigureFlags)
|
||||
|
@ -154,7 +155,7 @@ void FallApartEffect::slotWindowClosed(EffectWindow* c)
|
|||
c->refWindow();
|
||||
}
|
||||
|
||||
void FallApartEffect::windowDeleted(EffectWindow* c)
|
||||
void FallApartEffect::slotWindowDeleted(EffectWindow* c)
|
||||
{
|
||||
windows.remove(c);
|
||||
}
|
||||
|
|
|
@ -37,10 +37,10 @@ public:
|
|||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintScreen();
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowClosed(EffectWindow *c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
QHash< const EffectWindow*, double > windows;
|
||||
|
|
|
@ -39,6 +39,7 @@ GlideEffect::GlideEffect()
|
|||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
bool GlideEffect::supported()
|
||||
|
@ -202,7 +203,7 @@ void GlideEffect::slotWindowClosed(EffectWindow* w)
|
|||
w->addRepaintFull();
|
||||
}
|
||||
|
||||
void GlideEffect::windowDeleted(EffectWindow* w)
|
||||
void GlideEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
windows.remove(w);
|
||||
}
|
||||
|
|
|
@ -40,12 +40,11 @@ public:
|
|||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintWindow(EffectWindow* w);
|
||||
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
|
||||
static bool supported();
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow* c);
|
||||
void slotWindowClosed(EffectWindow *c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
class WindowInfo;
|
||||
|
|
|
@ -40,6 +40,7 @@ HighlightWindowEffect::HighlightWindowEffect()
|
|||
XChangeProperty(display(), rootWindow(), m_atom, m_atom, 8, PropModeReplace, &dummy, 1);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
HighlightWindowEffect::~HighlightWindowEffect()
|
||||
|
@ -123,7 +124,7 @@ void HighlightWindowEffect::slotWindowClosed(EffectWindow* w)
|
|||
finishHighlighting();
|
||||
}
|
||||
|
||||
void HighlightWindowEffect::windowDeleted(EffectWindow* w)
|
||||
void HighlightWindowEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
m_windowOpacity.remove(w);
|
||||
}
|
||||
|
|
|
@ -37,13 +37,12 @@ public:
|
|||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
|
||||
virtual void windowDeleted(EffectWindow* w);
|
||||
|
||||
virtual void propertyNotify(EffectWindow* w, long atom);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow* w);
|
||||
void slotWindowClosed(EffectWindow *w);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
void prepareHighlighting();
|
||||
|
|
|
@ -62,6 +62,7 @@ LogoutEffect::LogoutEffect()
|
|||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
LogoutEffect::~LogoutEffect()
|
||||
|
@ -318,7 +319,7 @@ void LogoutEffect::slotWindowClosed(EffectWindow* w)
|
|||
}
|
||||
}
|
||||
|
||||
void LogoutEffect::windowDeleted(EffectWindow* w)
|
||||
void LogoutEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
windows.removeAll(w);
|
||||
ignoredWindows.removeAll(w);
|
||||
|
|
|
@ -44,11 +44,11 @@ public:
|
|||
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
|
||||
virtual void postPaintScreen();
|
||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void windowDeleted(EffectWindow* w);
|
||||
virtual void propertyNotify(EffectWindow* w, long a);
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow* w);
|
||||
void slotWindowClosed(EffectWindow *w);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
private:
|
||||
bool isLogoutDialog(EffectWindow* w);
|
||||
double progress; // 0-1
|
||||
|
|
|
@ -34,6 +34,7 @@ MagicLampEffect::MagicLampEffect()
|
|||
{
|
||||
mActiveAnimations = 0;
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
bool MagicLampEffect::supported()
|
||||
|
@ -321,7 +322,7 @@ void MagicLampEffect::postPaintScreen()
|
|||
effects->postPaintScreen();
|
||||
}
|
||||
|
||||
void MagicLampEffect::windowDeleted(EffectWindow* w)
|
||||
void MagicLampEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
mTimeLineWindows.remove(w);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace KWin
|
|||
class MagicLampEffect
|
||||
: public Effect
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MagicLampEffect();
|
||||
|
||||
|
@ -38,12 +39,14 @@ public:
|
|||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintScreen();
|
||||
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
virtual void windowMinimized(EffectWindow* c);
|
||||
virtual void windowUnminimized(EffectWindow* c);
|
||||
|
||||
static bool supported();
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
QHash< EffectWindow*, TimeLine > mTimeLineWindows;
|
||||
int mActiveAnimations;
|
||||
|
|
|
@ -28,6 +28,7 @@ KWIN_EFFECT(minimizeanimation, MinimizeAnimationEffect)
|
|||
MinimizeAnimationEffect::MinimizeAnimationEffect()
|
||||
{
|
||||
mActiveAnimations = 0;
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,7 +109,7 @@ void MinimizeAnimationEffect::postPaintScreen()
|
|||
effects->postPaintScreen();
|
||||
}
|
||||
|
||||
void MinimizeAnimationEffect::windowDeleted(EffectWindow* w)
|
||||
void MinimizeAnimationEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
mTimeLineWindows.remove(w);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace KWin
|
|||
class MinimizeAnimationEffect
|
||||
: public Effect
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MinimizeAnimationEffect();
|
||||
|
||||
|
@ -42,10 +43,12 @@ public:
|
|||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintScreen();
|
||||
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
virtual void windowMinimized(EffectWindow* c);
|
||||
virtual void windowUnminimized(EffectWindow* c);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
QHash< EffectWindow*, TimeLine > mTimeLineWindows;
|
||||
int mActiveAnimations;
|
||||
|
|
|
@ -100,6 +100,7 @@ PresentWindowsEffect::PresentWindowsEffect()
|
|||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
PresentWindowsEffect::~PresentWindowsEffect()
|
||||
|
@ -404,7 +405,7 @@ void PresentWindowsEffect::slotWindowClosed(EffectWindow *w)
|
|||
rearrangeWindows();
|
||||
}
|
||||
|
||||
void PresentWindowsEffect::windowDeleted(EffectWindow *w)
|
||||
void PresentWindowsEffect::slotWindowDeleted(EffectWindow *w)
|
||||
{
|
||||
if (!m_windowData.contains(w))
|
||||
return;
|
||||
|
|
|
@ -102,7 +102,6 @@ public:
|
|||
virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
|
||||
|
||||
// User interaction
|
||||
virtual void windowDeleted(EffectWindow *w);
|
||||
virtual void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
||||
virtual bool borderActivated(ElectricBorder border);
|
||||
virtual void windowInputMouseEvent(Window w, QEvent *e);
|
||||
|
@ -161,6 +160,7 @@ public slots:
|
|||
// EffectsHandler
|
||||
void slotWindowAdded(EffectWindow *w);
|
||||
void slotWindowClosed(EffectWindow *w);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private slots:
|
||||
void closeWindow();
|
||||
|
|
|
@ -38,6 +38,7 @@ SheetEffect::SheetEffect()
|
|||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
bool SheetEffect::supported()
|
||||
|
@ -172,7 +173,7 @@ void SheetEffect::slotWindowClosed(EffectWindow* w)
|
|||
w->addRepaintFull();
|
||||
}
|
||||
|
||||
void SheetEffect::windowDeleted(EffectWindow* w)
|
||||
void SheetEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
windows.remove(w);
|
||||
}
|
||||
|
|
|
@ -39,13 +39,12 @@ public:
|
|||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintWindow(EffectWindow* w);
|
||||
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
|
||||
static bool supported();
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow* c);
|
||||
void slotWindowClosed(EffectWindow *c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
private:
|
||||
class WindowInfo;
|
||||
typedef QMap< const EffectWindow*, WindowInfo > InfoMap;
|
||||
|
|
|
@ -35,6 +35,7 @@ SlideBackEffect::SlideBackEffect()
|
|||
unminimizedWindow = NULL;
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowActivated(EffectWindow*)), this, SLOT(slotWindowActivated(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
static inline bool windowsShareDesktop(EffectWindow *w1, EffectWindow *w2)
|
||||
|
@ -278,7 +279,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
|
|||
effects->postPaintWindow(w);
|
||||
}
|
||||
|
||||
void SlideBackEffect::windowDeleted(EffectWindow* w)
|
||||
void SlideBackEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
usableOldStackingOrder.removeAll(w);
|
||||
oldStackingOrder.removeAll(w);
|
||||
|
|
|
@ -41,7 +41,6 @@ public:
|
|||
virtual void prePaintScreen(ScreenPrePaintData &data, int time);
|
||||
virtual void postPaintScreen();
|
||||
|
||||
virtual void windowDeleted(EffectWindow* w);
|
||||
virtual void windowUnminimized(EffectWindow* w);
|
||||
virtual void clientGroupItemSwitched(EffectWindow* from, EffectWindow* to);
|
||||
|
||||
|
@ -50,6 +49,7 @@ public:
|
|||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow *w);
|
||||
void slotWindowActivated(EffectWindow *w);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ SlidingPopupsEffect::SlidingPopupsEffect()
|
|||
XChangeProperty(display(), rootWindow(), mAtom, mAtom, 8, PropModeReplace, &dummy, 1);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
SlidingPopupsEffect::~SlidingPopupsEffect()
|
||||
|
@ -165,7 +166,7 @@ void SlidingPopupsEffect::slotWindowClosed(EffectWindow* w)
|
|||
}
|
||||
}
|
||||
|
||||
void SlidingPopupsEffect::windowDeleted(EffectWindow* w)
|
||||
void SlidingPopupsEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
mAppearingWindows.remove(w);
|
||||
mDisappearingWindows.remove(w);
|
||||
|
|
|
@ -39,12 +39,12 @@ public:
|
|||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void postPaintWindow(EffectWindow* w);
|
||||
// TODO react also on virtual desktop changes
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
virtual void propertyNotify(EffectWindow* w, long a);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow *c);
|
||||
void slotWindowClosed(EffectWindow *c);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
private:
|
||||
enum Position {
|
||||
West = 0,
|
||||
|
|
|
@ -44,6 +44,7 @@ TaskbarThumbnailEffect::TaskbarThumbnailEffect()
|
|||
unsigned char dummy = 0;
|
||||
XChangeProperty(display(), rootWindow(), atom, atom, 8, PropModeReplace, &dummy, 1);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
TaskbarThumbnailEffect::~TaskbarThumbnailEffect()
|
||||
|
@ -124,7 +125,7 @@ void TaskbarThumbnailEffect::slotWindowAdded(EffectWindow* w)
|
|||
propertyNotify(w, atom); // read initial value
|
||||
}
|
||||
|
||||
void TaskbarThumbnailEffect::windowDeleted(EffectWindow* w)
|
||||
void TaskbarThumbnailEffect::slotWindowDeleted(EffectWindow* w)
|
||||
{
|
||||
thumbnails.remove(w);
|
||||
}
|
||||
|
|
|
@ -39,11 +39,11 @@ public:
|
|||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||
virtual void windowDamaged(EffectWindow* w, const QRect& damage);
|
||||
virtual void windowDeleted(EffectWindow* w);
|
||||
virtual void propertyNotify(EffectWindow* w, long atom);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowAdded(EffectWindow *w);
|
||||
void slotWindowDeleted(EffectWindow *w);
|
||||
private:
|
||||
struct Data {
|
||||
Window window; // thumbnail of this window
|
||||
|
|
|
@ -131,10 +131,6 @@ void Effect::windowOpacityChanged(EffectWindow*, double)
|
|||
{
|
||||
}
|
||||
|
||||
void Effect::windowDeleted(EffectWindow*)
|
||||
{
|
||||
}
|
||||
|
||||
void Effect::windowMinimized(EffectWindow*)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -445,7 +445,6 @@ public:
|
|||
/** called when the geometry changed during moving/resizing. */
|
||||
virtual void windowMoveResizeGeometryUpdate(EffectWindow* c, const QRect& geometry);
|
||||
virtual void windowOpacityChanged(EffectWindow* c, double old_opacity);
|
||||
virtual void windowDeleted(EffectWindow* c);
|
||||
virtual void windowMinimized(EffectWindow* c);
|
||||
virtual void windowUnminimized(EffectWindow* c);
|
||||
virtual void clientGroupItemSwitched(EffectWindow* from, EffectWindow* to);
|
||||
|
@ -857,6 +856,18 @@ Q_SIGNALS:
|
|||
* @since 4.7
|
||||
**/
|
||||
void windowActivated(EffectWindow *w);
|
||||
/**
|
||||
* Signal emitted when a window is deleted.
|
||||
* This means that a closed window is not referenced any more.
|
||||
* An effect bookkeeping the closed windows should connect to this
|
||||
* signal to clean up the internal references.
|
||||
* @param w The window which is going to be deleted.
|
||||
* @see EffectWindow::refWindow
|
||||
* @see EffectWindow::unrefWindow
|
||||
* @see windowClosed
|
||||
* @since 4.7
|
||||
**/
|
||||
void windowDeleted(EffectWindow *w);
|
||||
|
||||
protected:
|
||||
QVector< EffectPair > loaded_effects;
|
||||
|
|
|
@ -725,8 +725,7 @@ void Workspace::removeDeleted(Deleted* c, allowed_t)
|
|||
assert(deleted.contains(c));
|
||||
if (scene)
|
||||
scene->windowDeleted(c);
|
||||
if (effects)
|
||||
static_cast<EffectsHandlerImpl*>(effects)->windowDeleted(c->effectWindow());
|
||||
emit deletedRemoved(c);
|
||||
deleted.removeAll(c);
|
||||
x_stacking_dirty = true;
|
||||
}
|
||||
|
|
|
@ -924,6 +924,7 @@ signals:
|
|||
void clientActivated(KWin::Client*);
|
||||
void groupAdded(KWin::Group*);
|
||||
void unmanagedAdded(KWin::Unmanaged*);
|
||||
void deletedRemoved(KWin::Deleted*);
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
|
Loading…
Reference in a new issue