PropertyNotify becomes a signal
parent
f134a5c6bd
commit
640fdc7b6d
15
effects.cpp
15
effects.cpp
|
@ -105,6 +105,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(CompositingType type)
|
||||||
connect(ws, SIGNAL(numberDesktopsChanged(int)), SIGNAL(numberDesktopsChanged(int)));
|
connect(ws, SIGNAL(numberDesktopsChanged(int)), SIGNAL(numberDesktopsChanged(int)));
|
||||||
connect(ws, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
connect(ws, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||||
SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||||
|
connect(ws, SIGNAL(propertyNotify(long)), this, SLOT(slotPropertyNotify(long)));
|
||||||
connect(ws->tabBox(), SIGNAL(tabBoxAdded(int)), SIGNAL(tabBoxAdded(int)));
|
connect(ws->tabBox(), SIGNAL(tabBoxAdded(int)), SIGNAL(tabBoxAdded(int)));
|
||||||
connect(ws->tabBox(), SIGNAL(tabBoxUpdated()), SIGNAL(tabBoxUpdated()));
|
connect(ws->tabBox(), SIGNAL(tabBoxUpdated()), SIGNAL(tabBoxUpdated()));
|
||||||
connect(ws->tabBox(), SIGNAL(tabBoxClosed()), SIGNAL(tabBoxClosed()));
|
connect(ws->tabBox(), SIGNAL(tabBoxClosed()), SIGNAL(tabBoxClosed()));
|
||||||
|
@ -138,6 +139,7 @@ void EffectsHandlerImpl::setupClientConnections(Client* c)
|
||||||
connect(c, SIGNAL(clientUnminimized(KWin::Client*,bool)), this, SLOT(slotClientUnminimized(KWin::Client*,bool)));
|
connect(c, SIGNAL(clientUnminimized(KWin::Client*,bool)), this, SLOT(slotClientUnminimized(KWin::Client*,bool)));
|
||||||
connect(c, SIGNAL(clientGeometryShapeChanged(KWin::Client*,QRect)), this, SLOT(slotClientGeometryShapeChanged(KWin::Client*,QRect)));
|
connect(c, SIGNAL(clientGeometryShapeChanged(KWin::Client*,QRect)), this, SLOT(slotClientGeometryShapeChanged(KWin::Client*,QRect)));
|
||||||
connect(c, SIGNAL(damaged(KWin::Toplevel*,QRect)), this, SLOT(slotWindowDamaged(KWin::Toplevel*,QRect)));
|
connect(c, SIGNAL(damaged(KWin::Toplevel*,QRect)), this, SLOT(slotWindowDamaged(KWin::Toplevel*,QRect)));
|
||||||
|
connect(c, SIGNAL(propertyNotify(KWin::Toplevel*,long)), this, SLOT(slotPropertyNotify(KWin::Toplevel*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
||||||
|
@ -146,6 +148,7 @@ void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
||||||
connect(u, SIGNAL(opacityChanged(KWin::Toplevel*,qreal)), this, SLOT(slotOpacityChanged(KWin::Toplevel*,qreal)));
|
connect(u, SIGNAL(opacityChanged(KWin::Toplevel*,qreal)), this, SLOT(slotOpacityChanged(KWin::Toplevel*,qreal)));
|
||||||
connect(u, SIGNAL(unmanagedGeometryShapeChanged(KWin::Unmanaged*,QRect)), this, SLOT(slotUnmanagedGeometryShapeChanged(KWin::Unmanaged*,QRect)));
|
connect(u, SIGNAL(unmanagedGeometryShapeChanged(KWin::Unmanaged*,QRect)), this, SLOT(slotUnmanagedGeometryShapeChanged(KWin::Unmanaged*,QRect)));
|
||||||
connect(u, SIGNAL(damaged(KWin::Toplevel*,QRect)), this, SLOT(slotWindowDamaged(KWin::Toplevel*,QRect)));
|
connect(u, SIGNAL(damaged(KWin::Toplevel*,QRect)), this, SLOT(slotWindowDamaged(KWin::Toplevel*,QRect)));
|
||||||
|
connect(u, SIGNAL(propertyNotify(KWin::Toplevel*,long)), this, SLOT(slotPropertyNotify(KWin::Toplevel*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::reconfigure()
|
void EffectsHandlerImpl::reconfigure()
|
||||||
|
@ -492,12 +495,18 @@ bool EffectsHandlerImpl::hasKeyboardGrab() const
|
||||||
return keyboard_grab_effect != NULL;
|
return keyboard_grab_effect != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::propertyNotify(EffectWindow* c, long atom)
|
void EffectsHandlerImpl::slotPropertyNotify(Toplevel* t, long int atom)
|
||||||
{
|
{
|
||||||
if (!registered_atoms.contains(atom))
|
if (!registered_atoms.contains(atom))
|
||||||
return;
|
return;
|
||||||
foreach (const EffectPair & ep, loaded_effects)
|
emit propertyNotify(t->effectWindow(), atom);
|
||||||
ep.second->propertyNotify(c, atom);
|
}
|
||||||
|
|
||||||
|
void EffectsHandlerImpl::slotPropertyNotify(long int atom)
|
||||||
|
{
|
||||||
|
if (!registered_atoms.contains(atom))
|
||||||
|
return;
|
||||||
|
emit propertyNotify(NULL, atom);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::registerPropertyType(long atom, bool reg)
|
void EffectsHandlerImpl::registerPropertyType(long atom, bool reg)
|
||||||
|
|
|
@ -162,7 +162,6 @@ public:
|
||||||
bool borderActivated(ElectricBorder border);
|
bool borderActivated(ElectricBorder border);
|
||||||
void grabbedKeyboardEvent(QKeyEvent* e);
|
void grabbedKeyboardEvent(QKeyEvent* e);
|
||||||
bool hasKeyboardGrab() const;
|
bool hasKeyboardGrab() const;
|
||||||
void propertyNotify(EffectWindow* c, long atom);
|
|
||||||
|
|
||||||
bool loadEffect(const QString& name);
|
bool loadEffect(const QString& name);
|
||||||
void toggleEffect(const QString& name);
|
void toggleEffect(const QString& name);
|
||||||
|
@ -195,6 +194,8 @@ protected Q_SLOTS:
|
||||||
void slotClientGeometryShapeChanged(KWin::Client *c, const QRect &old);
|
void slotClientGeometryShapeChanged(KWin::Client *c, const QRect &old);
|
||||||
void slotUnmanagedGeometryShapeChanged(KWin::Unmanaged *u, const QRect &old);
|
void slotUnmanagedGeometryShapeChanged(KWin::Unmanaged *u, const QRect &old);
|
||||||
void slotWindowDamaged(KWin::Toplevel *t, const QRect& r);
|
void slotWindowDamaged(KWin::Toplevel *t, const QRect& r);
|
||||||
|
void slotPropertyNotify(KWin::Toplevel *t, long atom);
|
||||||
|
void slotPropertyNotify(long atom);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
KLibrary* findEffectLibrary(KService* service);
|
KLibrary* findEffectLibrary(KService* service);
|
||||||
|
|
|
@ -58,6 +58,7 @@ BlurEffect::BlurEffect()
|
||||||
XDeleteProperty(display(), rootWindow(), net_wm_blur_region);
|
XDeleteProperty(display(), rootWindow(), net_wm_blur_region);
|
||||||
}
|
}
|
||||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||||
|
connect(effects, SIGNAL(propertyNotify(EffectWindow*,long)), this, SLOT(slotPropertyNotify(EffectWindow*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
BlurEffect::~BlurEffect()
|
BlurEffect::~BlurEffect()
|
||||||
|
@ -112,7 +113,7 @@ void BlurEffect::slotWindowAdded(EffectWindow *w)
|
||||||
updateBlurRegion(w);
|
updateBlurRegion(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlurEffect::propertyNotify(EffectWindow *w, long atom)
|
void BlurEffect::slotPropertyNotify(EffectWindow *w, long atom)
|
||||||
{
|
{
|
||||||
if (w && atom == net_wm_blur_region)
|
if (w && atom == net_wm_blur_region)
|
||||||
updateBlurRegion(w);
|
updateBlurRegion(w);
|
||||||
|
|
|
@ -41,13 +41,13 @@ public:
|
||||||
static bool supported();
|
static bool supported();
|
||||||
|
|
||||||
void reconfigure(ReconfigureFlags flags);
|
void reconfigure(ReconfigureFlags flags);
|
||||||
void propertyNotify(EffectWindow *w, long atom);
|
|
||||||
void paintScreen(int mask, QRegion region, ScreenPaintData &data);
|
void paintScreen(int mask, QRegion region, ScreenPaintData &data);
|
||||||
void drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
|
void drawWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
|
||||||
void paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity);
|
void paintEffectFrame(EffectFrame *frame, QRegion region, double opacity, double frameOpacity);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slotWindowAdded(EffectWindow *w);
|
void slotWindowAdded(EffectWindow *w);
|
||||||
|
void slotPropertyNotify(EffectWindow *w, long atom);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QRect expand(const QRect &rect) const;
|
QRect expand(const QRect &rect) const;
|
||||||
|
|
|
@ -41,6 +41,7 @@ HighlightWindowEffect::HighlightWindowEffect()
|
||||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||||
|
connect(effects, SIGNAL(propertyNotify(EffectWindow*,long)), this, SLOT(slotPropertyNotify(EffectWindow*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
HighlightWindowEffect::~HighlightWindowEffect()
|
HighlightWindowEffect::~HighlightWindowEffect()
|
||||||
|
@ -115,7 +116,7 @@ void HighlightWindowEffect::slotWindowAdded(EffectWindow* w)
|
||||||
else
|
else
|
||||||
m_windowOpacity[w] = 1.0;
|
m_windowOpacity[w] = 1.0;
|
||||||
}
|
}
|
||||||
propertyNotify(w, m_atom); // Check initial value
|
slotPropertyNotify(w, m_atom); // Check initial value
|
||||||
}
|
}
|
||||||
|
|
||||||
void HighlightWindowEffect::slotWindowClosed(EffectWindow* w)
|
void HighlightWindowEffect::slotWindowClosed(EffectWindow* w)
|
||||||
|
@ -129,7 +130,7 @@ void HighlightWindowEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
m_windowOpacity.remove(w);
|
m_windowOpacity.remove(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HighlightWindowEffect::propertyNotify(EffectWindow* w, long a)
|
void HighlightWindowEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
{
|
{
|
||||||
if (a != m_atom)
|
if (a != m_atom)
|
||||||
return; // Not our atom
|
return; // Not our atom
|
||||||
|
|
|
@ -37,12 +37,11 @@ public:
|
||||||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||||
|
|
||||||
virtual void propertyNotify(EffectWindow* w, long atom);
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slotWindowAdded(EffectWindow* w);
|
void slotWindowAdded(EffectWindow* w);
|
||||||
void slotWindowClosed(EffectWindow *w);
|
void slotWindowClosed(EffectWindow *w);
|
||||||
void slotWindowDeleted(EffectWindow *w);
|
void slotWindowDeleted(EffectWindow *w);
|
||||||
|
void slotPropertyNotify(EffectWindow* w, long atom);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void prepareHighlighting();
|
void prepareHighlighting();
|
||||||
|
|
|
@ -63,6 +63,7 @@ LogoutEffect::LogoutEffect()
|
||||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||||
|
connect(effects, SIGNAL(propertyNotify(EffectWindow*,long)), this, SLOT(slotPropertyNotify(EffectWindow*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
LogoutEffect::~LogoutEffect()
|
LogoutEffect::~LogoutEffect()
|
||||||
|
@ -366,7 +367,7 @@ void LogoutEffect::renderVignetting()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void LogoutEffect::propertyNotify(EffectWindow* w, long a)
|
void LogoutEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
{
|
{
|
||||||
if (w || a != logoutAtom)
|
if (w || a != logoutAtom)
|
||||||
return; // Not our atom
|
return; // Not our atom
|
||||||
|
|
|
@ -44,11 +44,11 @@ public:
|
||||||
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
|
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
|
||||||
virtual void postPaintScreen();
|
virtual void postPaintScreen();
|
||||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||||
virtual void propertyNotify(EffectWindow* w, long a);
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slotWindowAdded(EffectWindow* w);
|
void slotWindowAdded(EffectWindow* w);
|
||||||
void slotWindowClosed(EffectWindow *w);
|
void slotWindowClosed(EffectWindow *w);
|
||||||
void slotWindowDeleted(EffectWindow *w);
|
void slotWindowDeleted(EffectWindow *w);
|
||||||
|
void slotPropertyNotify(EffectWindow *w, long a);
|
||||||
private:
|
private:
|
||||||
bool isLogoutDialog(EffectWindow* w);
|
bool isLogoutDialog(EffectWindow* w);
|
||||||
double progress; // 0-1
|
double progress; // 0-1
|
||||||
|
|
|
@ -106,6 +106,7 @@ PresentWindowsEffect::PresentWindowsEffect()
|
||||||
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
|
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
|
||||||
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
|
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
|
||||||
connect(effects, SIGNAL(tabBoxKeyEvent(QKeyEvent*)), this, SLOT(slotTabBoxKeyEvent(QKeyEvent*)));
|
connect(effects, SIGNAL(tabBoxKeyEvent(QKeyEvent*)), this, SLOT(slotTabBoxKeyEvent(QKeyEvent*)));
|
||||||
|
connect(effects, SIGNAL(propertyNotify(EffectWindow*,long)), this, SLOT(slotPropertyNotify(EffectWindow*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
PresentWindowsEffect::~PresentWindowsEffect()
|
PresentWindowsEffect::~PresentWindowsEffect()
|
||||||
|
@ -741,7 +742,7 @@ void PresentWindowsEffect::slotTabBoxKeyEvent(QKeyEvent* event)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Atom handling
|
// Atom handling
|
||||||
void PresentWindowsEffect::propertyNotify(EffectWindow* w, long a)
|
void PresentWindowsEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
{
|
{
|
||||||
if (!w || (a != m_atomDesktop && a != m_atomWindows))
|
if (!w || (a != m_atomDesktop && a != m_atomWindows))
|
||||||
return; // Not our atom
|
return; // Not our atom
|
||||||
|
|
|
@ -106,9 +106,6 @@ public:
|
||||||
virtual void windowInputMouseEvent(Window w, QEvent *e);
|
virtual void windowInputMouseEvent(Window w, QEvent *e);
|
||||||
virtual void grabbedKeyboardEvent(QKeyEvent *e);
|
virtual void grabbedKeyboardEvent(QKeyEvent *e);
|
||||||
|
|
||||||
// atoms
|
|
||||||
virtual void propertyNotify(EffectWindow* w, long atom);
|
|
||||||
|
|
||||||
enum { LayoutNatural, LayoutRegularGrid, LayoutFlexibleGrid }; // Layout modes
|
enum { LayoutNatural, LayoutRegularGrid, LayoutFlexibleGrid }; // Layout modes
|
||||||
enum PresentWindowsMode {
|
enum PresentWindowsMode {
|
||||||
ModeAllDesktops, // Shows windows of all desktops
|
ModeAllDesktops, // Shows windows of all desktops
|
||||||
|
@ -160,6 +157,8 @@ public slots:
|
||||||
void slotTabBoxClosed();
|
void slotTabBoxClosed();
|
||||||
void slotTabBoxUpdated();
|
void slotTabBoxUpdated();
|
||||||
void slotTabBoxKeyEvent(QKeyEvent* event);
|
void slotTabBoxKeyEvent(QKeyEvent* event);
|
||||||
|
// atoms
|
||||||
|
void slotPropertyNotify(EffectWindow* w, long atom);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void closeWindow();
|
void closeWindow();
|
||||||
|
|
|
@ -41,6 +41,7 @@ SlidingPopupsEffect::SlidingPopupsEffect()
|
||||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||||
|
connect(effects, SIGNAL(propertyNotify(EffectWindow*,long)), this, SLOT(slotPropertyNotify(EffectWindow*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
SlidingPopupsEffect::~SlidingPopupsEffect()
|
SlidingPopupsEffect::~SlidingPopupsEffect()
|
||||||
|
@ -136,7 +137,7 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow* w)
|
||||||
|
|
||||||
void SlidingPopupsEffect::slotWindowAdded(EffectWindow *w)
|
void SlidingPopupsEffect::slotWindowAdded(EffectWindow *w)
|
||||||
{
|
{
|
||||||
propertyNotify(w, mAtom);
|
slotPropertyNotify(w, mAtom);
|
||||||
if (w->isOnCurrentDesktop() && mWindowsData.contains(w)) {
|
if (w->isOnCurrentDesktop() && mWindowsData.contains(w)) {
|
||||||
mAppearingWindows[ w ].setDuration(mWindowsData[ w ].fadeInDuration);
|
mAppearingWindows[ w ].setDuration(mWindowsData[ w ].fadeInDuration);
|
||||||
mAppearingWindows[ w ].setProgress(0.0);
|
mAppearingWindows[ w ].setProgress(0.0);
|
||||||
|
@ -151,7 +152,7 @@ void SlidingPopupsEffect::slotWindowAdded(EffectWindow *w)
|
||||||
|
|
||||||
void SlidingPopupsEffect::slotWindowClosed(EffectWindow* w)
|
void SlidingPopupsEffect::slotWindowClosed(EffectWindow* w)
|
||||||
{
|
{
|
||||||
propertyNotify(w, mAtom);
|
slotPropertyNotify(w, mAtom);
|
||||||
if (w->isOnCurrentDesktop() && !w->isMinimized() && mWindowsData.contains(w)) {
|
if (w->isOnCurrentDesktop() && !w->isMinimized() && mWindowsData.contains(w)) {
|
||||||
w->refWindow();
|
w->refWindow();
|
||||||
mAppearingWindows.remove(w);
|
mAppearingWindows.remove(w);
|
||||||
|
@ -174,7 +175,7 @@ void SlidingPopupsEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
effects->addRepaint(w->geometry());
|
effects->addRepaint(w->geometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlidingPopupsEffect::propertyNotify(EffectWindow* w, long a)
|
void SlidingPopupsEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
{
|
{
|
||||||
if (!w || a != mAtom)
|
if (!w || a != mAtom)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -39,12 +39,12 @@ public:
|
||||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||||
virtual void postPaintWindow(EffectWindow* w);
|
virtual void postPaintWindow(EffectWindow* w);
|
||||||
// TODO react also on virtual desktop changes
|
// TODO react also on virtual desktop changes
|
||||||
virtual void propertyNotify(EffectWindow* w, long a);
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slotWindowAdded(EffectWindow *c);
|
void slotWindowAdded(EffectWindow *c);
|
||||||
void slotWindowClosed(EffectWindow *c);
|
void slotWindowClosed(EffectWindow *c);
|
||||||
void slotWindowDeleted(EffectWindow *w);
|
void slotWindowDeleted(EffectWindow *w);
|
||||||
|
void slotPropertyNotify(EffectWindow *w, long a);
|
||||||
private:
|
private:
|
||||||
enum Position {
|
enum Position {
|
||||||
West = 0,
|
West = 0,
|
||||||
|
|
|
@ -46,6 +46,7 @@ TaskbarThumbnailEffect::TaskbarThumbnailEffect()
|
||||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||||
connect(effects, SIGNAL(windowDamaged(EffectWindow*,QRect)), this, SLOT(slotWindowDamaged(EffectWindow*,QRect)));
|
connect(effects, SIGNAL(windowDamaged(EffectWindow*,QRect)), this, SLOT(slotWindowDamaged(EffectWindow*,QRect)));
|
||||||
|
connect(effects, SIGNAL(propertyNotify(EffectWindow*,long)), this, SLOT(slotPropertyNotify(EffectWindow*,long)));
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskbarThumbnailEffect::~TaskbarThumbnailEffect()
|
TaskbarThumbnailEffect::~TaskbarThumbnailEffect()
|
||||||
|
@ -123,7 +124,7 @@ void TaskbarThumbnailEffect::slotWindowDamaged(EffectWindow* w, const QRect& dam
|
||||||
|
|
||||||
void TaskbarThumbnailEffect::slotWindowAdded(EffectWindow* w)
|
void TaskbarThumbnailEffect::slotWindowAdded(EffectWindow* w)
|
||||||
{
|
{
|
||||||
propertyNotify(w, atom); // read initial value
|
slotPropertyNotify(w, atom); // read initial value
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskbarThumbnailEffect::slotWindowDeleted(EffectWindow* w)
|
void TaskbarThumbnailEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
|
@ -131,7 +132,7 @@ void TaskbarThumbnailEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
thumbnails.remove(w);
|
thumbnails.remove(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskbarThumbnailEffect::propertyNotify(EffectWindow* w, long a)
|
void TaskbarThumbnailEffect::slotPropertyNotify(EffectWindow* w, long a)
|
||||||
{
|
{
|
||||||
if (!w || a != atom)
|
if (!w || a != atom)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -38,12 +38,12 @@ public:
|
||||||
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
|
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
|
||||||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
||||||
virtual void propertyNotify(EffectWindow* w, long atom);
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slotWindowAdded(EffectWindow *w);
|
void slotWindowAdded(EffectWindow *w);
|
||||||
void slotWindowDeleted(EffectWindow *w);
|
void slotWindowDeleted(EffectWindow *w);
|
||||||
void slotWindowDamaged(EffectWindow* w, const QRect& damage);
|
void slotWindowDamaged(EffectWindow* w, const QRect& damage);
|
||||||
|
void slotPropertyNotify(EffectWindow *w, long atom);
|
||||||
private:
|
private:
|
||||||
struct Data {
|
struct Data {
|
||||||
Window window; // thumbnail of this window
|
Window window; // thumbnail of this window
|
||||||
|
|
|
@ -301,9 +301,9 @@ bool Workspace::workspaceEvent(XEvent * e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want to pass root window property events to effects
|
// We want to pass root window property events to effects
|
||||||
if (e->type == PropertyNotify && e->xany.window == rootWindow() && effects) {
|
if (e->type == PropertyNotify && e->xany.window == rootWindow()) {
|
||||||
XPropertyEvent* re = &e->xproperty;
|
XPropertyEvent* re = &e->xproperty;
|
||||||
static_cast< EffectsHandlerImpl* >(effects)->propertyNotify(NULL, re->atom);
|
emit propertyNotify(re->atom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (movingClient != NULL && movingClient->moveResizeGrabWindow() == e->xany.window
|
if (movingClient != NULL && movingClient->moveResizeGrabWindow() == e->xany.window
|
||||||
|
@ -1691,8 +1691,7 @@ void Toplevel::propertyNotifyEvent(XPropertyEvent* e)
|
||||||
getWindowRole();
|
getWindowRole();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (effects)
|
emit propertyNotify(this, e->atom);
|
||||||
static_cast< EffectsHandlerImpl* >(effects)->propertyNotify(effectWindow(), e->atom);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************
|
// ****************************************
|
||||||
|
|
|
@ -131,10 +131,6 @@ void Effect::grabbedKeyboardEvent(QKeyEvent*)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Effect::propertyNotify(EffectWindow* , long)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Effect::borderActivated(ElectricBorder)
|
bool Effect::borderActivated(ElectricBorder)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -444,14 +444,6 @@ public:
|
||||||
virtual void windowMoveResizeGeometryUpdate(EffectWindow* c, const QRect& geometry);
|
virtual void windowMoveResizeGeometryUpdate(EffectWindow* c, const QRect& geometry);
|
||||||
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
||||||
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
||||||
/**
|
|
||||||
Receives events registered for using EffectsHandler::registerPropertyType().
|
|
||||||
Use readProperty() to get the property data.
|
|
||||||
Note that the property may be already set on the window, so doing the same
|
|
||||||
processing from windowAdded() (e.g. simply calling propertyNotify() from it)
|
|
||||||
is usually needed.
|
|
||||||
*/
|
|
||||||
virtual void propertyNotify(EffectWindow* w, long atom);
|
|
||||||
|
|
||||||
virtual bool borderActivated(ElectricBorder border);
|
virtual bool borderActivated(ElectricBorder border);
|
||||||
|
|
||||||
|
@ -960,6 +952,17 @@ Q_SIGNALS:
|
||||||
void mouseChanged(const QPoint& pos, const QPoint& oldpos,
|
void mouseChanged(const QPoint& pos, const QPoint& oldpos,
|
||||||
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
|
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
|
||||||
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
|
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
|
||||||
|
/**
|
||||||
|
* Receives events registered for using @link registerPropertyType.
|
||||||
|
* Use readProperty() to get the property data.
|
||||||
|
* Note that the property may be already set on the window, so doing the same
|
||||||
|
* processing from windowAdded() (e.g. simply calling propertyNotify() from it)
|
||||||
|
* is usually needed.
|
||||||
|
* @param w The window whose property changed, is @c null if it is a root window property
|
||||||
|
* @param atom The property
|
||||||
|
* @since 4.7
|
||||||
|
*/
|
||||||
|
void propertyNotify(EffectWindow* w, long atom);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QVector< EffectPair > loaded_effects;
|
QVector< EffectPair > loaded_effects;
|
||||||
|
|
|
@ -138,6 +138,7 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void opacityChanged(KWin::Toplevel* toplevel, qreal oldOpacity);
|
void opacityChanged(KWin::Toplevel* toplevel, qreal oldOpacity);
|
||||||
void damaged(KWin::Toplevel* toplevel, const QRect& damage);
|
void damaged(KWin::Toplevel* toplevel, const QRect& damage);
|
||||||
|
void propertyNotify(KWin::Toplevel* toplevel, long a);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~Toplevel();
|
virtual ~Toplevel();
|
||||||
|
|
|
@ -932,6 +932,7 @@ signals:
|
||||||
void mouseChanged(const QPoint& pos, const QPoint& oldpos,
|
void mouseChanged(const QPoint& pos, const QPoint& oldpos,
|
||||||
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
|
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
|
||||||
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
|
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
|
||||||
|
void propertyNotify(long a);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init();
|
void init();
|
||||||
|
|
Loading…
Reference in New Issue