WindowGeometryShapeChanged becomes a signal
This commit is contained in:
parent
dcebc7481b
commit
911098ee76
17 changed files with 59 additions and 36 deletions
14
client.cpp
14
client.cpp
|
@ -366,8 +366,7 @@ void Client::updateDecoration(bool check_workspace_pos, bool force)
|
||||||
discardWindowPixmap();
|
discardWindowPixmap();
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit clientGeometryShapeChanged(this, oldgeom);
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), oldgeom);
|
|
||||||
} else
|
} else
|
||||||
destroyDecoration();
|
destroyDecoration();
|
||||||
if (check_workspace_pos)
|
if (check_workspace_pos)
|
||||||
|
@ -396,8 +395,9 @@ void Client::destroyDecoration()
|
||||||
discardWindowPixmap();
|
discardWindowPixmap();
|
||||||
if (scene != NULL && !deleting)
|
if (scene != NULL && !deleting)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL && !deleting)
|
if (!deleting) {
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), oldgeom);
|
emit clientGeometryShapeChanged(this, oldgeom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,8 +739,7 @@ void Client::updateShape()
|
||||||
}
|
}
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit clientGeometryShapeChanged(this, geometry());
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), geometry());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Window shape_helper_window = None;
|
static Window shape_helper_window = None;
|
||||||
|
@ -818,8 +817,7 @@ void Client::setMask(const QRegion& reg, int mode)
|
||||||
}
|
}
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit clientGeometryShapeChanged(this, geometry());
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), geometry());
|
|
||||||
updateShape();
|
updateShape();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
client.h
1
client.h
|
@ -498,6 +498,7 @@ signals:
|
||||||
void clientMaximizedStateChanged(KWin::Client*, KDecorationDefines::MaximizeMode);
|
void clientMaximizedStateChanged(KWin::Client*, KDecorationDefines::MaximizeMode);
|
||||||
void clientMinimized(KWin::Client* client, bool animate);
|
void clientMinimized(KWin::Client* client, bool animate);
|
||||||
void clientUnminimized(KWin::Client* client, bool animate);
|
void clientUnminimized(KWin::Client* client, bool animate);
|
||||||
|
void clientGeometryShapeChanged(KWin::Client* client, const QRect& old);
|
||||||
|
|
||||||
// To make workspace-client calls, a few slots are also
|
// To make workspace-client calls, a few slots are also
|
||||||
// required
|
// required
|
||||||
|
|
22
effects.cpp
22
effects.cpp
|
@ -134,12 +134,14 @@ void EffectsHandlerImpl::setupClientConnections(Client* c)
|
||||||
connect(c, SIGNAL(opacityChanged(KWin::Toplevel*,qreal)), this, SLOT(slotOpacityChanged(KWin::Toplevel*,qreal)));
|
connect(c, SIGNAL(opacityChanged(KWin::Toplevel*,qreal)), this, SLOT(slotOpacityChanged(KWin::Toplevel*,qreal)));
|
||||||
connect(c, SIGNAL(clientMinimized(KWin::Client*,bool)), this, SLOT(slotClientMinimized(KWin::Client*,bool)));
|
connect(c, SIGNAL(clientMinimized(KWin::Client*,bool)), this, SLOT(slotClientMinimized(KWin::Client*,bool)));
|
||||||
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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
||||||
{
|
{
|
||||||
connect(u, SIGNAL(unmanagedClosed(KWin::Unmanaged*)), this, SLOT(slotUnmanagedClosed(KWin::Unmanaged*)));
|
connect(u, SIGNAL(unmanagedClosed(KWin::Unmanaged*)), this, SLOT(slotUnmanagedClosed(KWin::Unmanaged*)));
|
||||||
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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::reconfigure()
|
void EffectsHandlerImpl::reconfigure()
|
||||||
|
@ -395,12 +397,22 @@ void EffectsHandlerImpl::windowDamaged(EffectWindow* w, const QRect& r)
|
||||||
ep.second->windowDamaged(w, r);
|
ep.second->windowDamaged(w, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::windowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
void EffectsHandlerImpl::slotClientGeometryShapeChanged(Client* c, const QRect& old)
|
||||||
{
|
{
|
||||||
if (w == NULL) // during late cleanup effectWindow() may be already NULL
|
// during late cleanup effectWindow() may be already NULL
|
||||||
return; // in some functions that may still call this
|
// in some functions that may still call this
|
||||||
foreach (const EffectPair & ep, loaded_effects)
|
if (c == NULL || c->effectWindow() == NULL)
|
||||||
ep.second->windowGeometryShapeChanged(w, old);
|
return;
|
||||||
|
emit windowGeometryShapeChanged(c->effectWindow(), old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EffectsHandlerImpl::slotUnmanagedGeometryShapeChanged(Unmanaged* u, const QRect& old)
|
||||||
|
{
|
||||||
|
// during late cleanup effectWindow() may be already NULL
|
||||||
|
// in some functions that may still call this
|
||||||
|
if (u == NULL || u->effectWindow() == NULL)
|
||||||
|
return;
|
||||||
|
emit windowGeometryShapeChanged(u->effectWindow(), old);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::setActiveFullScreenEffect(Effect* e)
|
void EffectsHandlerImpl::setActiveFullScreenEffect(Effect* e)
|
||||||
|
|
|
@ -160,7 +160,6 @@ public:
|
||||||
void startPaint();
|
void startPaint();
|
||||||
void windowMoveResizeGeometryUpdate(EffectWindow* c, const QRect& geometry);
|
void windowMoveResizeGeometryUpdate(EffectWindow* c, const QRect& geometry);
|
||||||
void windowDamaged(EffectWindow* w, const QRect& r);
|
void windowDamaged(EffectWindow* w, const QRect& r);
|
||||||
void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
|
||||||
bool borderActivated(ElectricBorder border);
|
bool borderActivated(ElectricBorder border);
|
||||||
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,
|
||||||
|
@ -197,6 +196,8 @@ protected Q_SLOTS:
|
||||||
void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity);
|
void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity);
|
||||||
void slotClientMinimized(KWin::Client *c, bool animate);
|
void slotClientMinimized(KWin::Client *c, bool animate);
|
||||||
void slotClientUnminimized(KWin::Client *c, bool animate);
|
void slotClientUnminimized(KWin::Client *c, bool animate);
|
||||||
|
void slotClientGeometryShapeChanged(KWin::Client *c, const QRect &old);
|
||||||
|
void slotUnmanagedGeometryShapeChanged(KWin::Unmanaged *u, const QRect &old);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
KLibrary* findEffectLibrary(KService* service);
|
KLibrary* findEffectLibrary(KService* service);
|
||||||
|
|
|
@ -61,6 +61,7 @@ BoxSwitchEffect::BoxSwitchEffect()
|
||||||
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
||||||
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(windowGeometryShapeChanged(EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(EffectWindow*,QRect)));
|
||||||
}
|
}
|
||||||
|
|
||||||
BoxSwitchEffect::~BoxSwitchEffect()
|
BoxSwitchEffect::~BoxSwitchEffect()
|
||||||
|
@ -273,7 +274,7 @@ void BoxSwitchEffect::windowDamaged(EffectWindow* w, const QRect& damage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoxSwitchEffect::windowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
void BoxSwitchEffect::slotWindowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
||||||
{
|
{
|
||||||
if (mActivated) {
|
if (mActivated) {
|
||||||
if (mMode == TabBoxWindowsMode || mMode == TabBoxWindowsAlternativeMode) {
|
if (mMode == TabBoxWindowsMode || mMode == TabBoxWindowsAlternativeMode) {
|
||||||
|
|
|
@ -54,7 +54,6 @@ public:
|
||||||
|
|
||||||
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
||||||
virtual void windowDamaged(EffectWindow* w, const QRect& damage);
|
virtual void windowDamaged(EffectWindow* w, const QRect& damage);
|
||||||
virtual void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
|
||||||
virtual void* proxy();
|
virtual void* proxy();
|
||||||
void activateFromProxy(int mode, bool animate, bool showText, float positioningFactor);
|
void activateFromProxy(int mode, bool animate, bool showText, float positioningFactor);
|
||||||
void paintWindowsBox(const QRegion& region);
|
void paintWindowsBox(const QRegion& region);
|
||||||
|
@ -64,6 +63,7 @@ public Q_SLOTS:
|
||||||
void slotTabBoxAdded(int mode);
|
void slotTabBoxAdded(int mode);
|
||||||
void slotTabBoxClosed();
|
void slotTabBoxClosed();
|
||||||
void slotTabBoxUpdated();
|
void slotTabBoxUpdated();
|
||||||
|
void slotWindowGeometryShapeChanged(EffectWindow *w, const QRect &old);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class ItemInfo;
|
class ItemInfo;
|
||||||
|
|
|
@ -77,6 +77,7 @@ DesktopGridEffect::DesktopGridEffect()
|
||||||
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(numberDesktopsChanged(int)), this, SLOT(slotNumberDesktopsChanged(int)));
|
connect(effects, SIGNAL(numberDesktopsChanged(int)), this, SLOT(slotNumberDesktopsChanged(int)));
|
||||||
|
connect(effects, SIGNAL(windowGeometryShapeChanged(EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(EffectWindow*,QRect)));
|
||||||
|
|
||||||
// Load all other configuration details
|
// Load all other configuration details
|
||||||
reconfigure(ReconfigureAll);
|
reconfigure(ReconfigureAll);
|
||||||
|
@ -439,7 +440,7 @@ void DesktopGridEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopGridEffect::windowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
void DesktopGridEffect::slotWindowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
||||||
{
|
{
|
||||||
Q_UNUSED(old)
|
Q_UNUSED(old)
|
||||||
if (!activated)
|
if (!activated)
|
||||||
|
|
|
@ -71,7 +71,6 @@ public:
|
||||||
virtual void postPaintScreen();
|
virtual void postPaintScreen();
|
||||||
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 windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
|
||||||
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
virtual void windowInputMouseEvent(Window w, QEvent* e);
|
||||||
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
virtual void grabbedKeyboardEvent(QKeyEvent* e);
|
||||||
virtual bool borderActivated(ElectricBorder border);
|
virtual bool borderActivated(ElectricBorder border);
|
||||||
|
@ -89,6 +88,7 @@ private slots:
|
||||||
void slotWindowClosed(EffectWindow *w);
|
void slotWindowClosed(EffectWindow *w);
|
||||||
void slotWindowDeleted(EffectWindow *w);
|
void slotWindowDeleted(EffectWindow *w);
|
||||||
void slotNumberDesktopsChanged(int old);
|
void slotNumberDesktopsChanged(int old);
|
||||||
|
void slotWindowGeometryShapeChanged(EffectWindow *w, const QRect &old);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointF scalePos(const QPoint& pos, int desktop, int screen = -1) const;
|
QPointF scalePos(const QPoint& pos, int desktop, int screen = -1) const;
|
||||||
|
|
|
@ -101,6 +101,7 @@ PresentWindowsEffect::PresentWindowsEffect()
|
||||||
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(windowGeometryShapeChanged(EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(EffectWindow*,QRect)));
|
||||||
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
||||||
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()));
|
||||||
|
@ -419,7 +420,7 @@ void PresentWindowsEffect::slotWindowDeleted(EffectWindow *w)
|
||||||
m_motionManager.unmanage(w);
|
m_motionManager.unmanage(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresentWindowsEffect::windowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
void PresentWindowsEffect::slotWindowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
||||||
{
|
{
|
||||||
Q_UNUSED(old)
|
Q_UNUSED(old)
|
||||||
if (!m_activated)
|
if (!m_activated)
|
||||||
|
|
|
@ -102,7 +102,6 @@ public:
|
||||||
virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
|
virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
|
||||||
|
|
||||||
// User interaction
|
// User interaction
|
||||||
virtual void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
|
||||||
virtual bool borderActivated(ElectricBorder border);
|
virtual bool borderActivated(ElectricBorder border);
|
||||||
virtual void windowInputMouseEvent(Window w, QEvent *e);
|
virtual void windowInputMouseEvent(Window w, QEvent *e);
|
||||||
virtual void grabbedKeyboardEvent(QKeyEvent *e);
|
virtual void grabbedKeyboardEvent(QKeyEvent *e);
|
||||||
|
@ -155,6 +154,7 @@ public 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 slotWindowGeometryShapeChanged(EffectWindow *w, const QRect &old);
|
||||||
// Tab box
|
// Tab box
|
||||||
void slotTabBoxAdded(int mode);
|
void slotTabBoxAdded(int mode);
|
||||||
void slotTabBoxClosed();
|
void slotTabBoxClosed();
|
||||||
|
|
|
@ -39,6 +39,7 @@ ThumbnailAsideEffect::ThumbnailAsideEffect()
|
||||||
a->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_T));
|
a->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_T));
|
||||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleCurrentThumbnail()));
|
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleCurrentThumbnail()));
|
||||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||||
|
connect(effects, SIGNAL(windowGeometryShapeChanged(EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(EffectWindow*,QRect)));
|
||||||
reconfigure(ReconfigureAll);
|
reconfigure(ReconfigureAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ void ThumbnailAsideEffect::windowDamaged(EffectWindow* w, const QRect&)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThumbnailAsideEffect::windowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
void ThumbnailAsideEffect::slotWindowGeometryShapeChanged(EffectWindow* w, const QRect& old)
|
||||||
{
|
{
|
||||||
foreach (const Data & d, windows) {
|
foreach (const Data & d, windows) {
|
||||||
if (d.window == w) {
|
if (d.window == w) {
|
||||||
|
|
|
@ -44,10 +44,10 @@ public:
|
||||||
virtual void reconfigure(ReconfigureFlags);
|
virtual void reconfigure(ReconfigureFlags);
|
||||||
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
|
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
|
||||||
virtual void windowDamaged(EffectWindow* w, const QRect& damage);
|
virtual void windowDamaged(EffectWindow* w, const QRect& damage);
|
||||||
virtual void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
|
||||||
private slots:
|
private slots:
|
||||||
void toggleCurrentThumbnail();
|
void toggleCurrentThumbnail();
|
||||||
void slotWindowClosed(EffectWindow *w);
|
void slotWindowClosed(EffectWindow *w);
|
||||||
|
void slotWindowGeometryShapeChanged(EffectWindow *w, const QRect &old);
|
||||||
private:
|
private:
|
||||||
void addThumbnail(EffectWindow* w);
|
void addThumbnail(EffectWindow* w);
|
||||||
void removeThumbnail(EffectWindow* w);
|
void removeThumbnail(EffectWindow* w);
|
||||||
|
|
|
@ -1636,8 +1636,7 @@ bool Unmanaged::windowEvent(XEvent* e)
|
||||||
addWorkspaceRepaint(geometry()); // in case shape change removes part of this window
|
addWorkspaceRepaint(geometry()); // in case shape change removes part of this window
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit unmanagedGeometryShapeChanged(this, geometry());
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), geometry());
|
|
||||||
}
|
}
|
||||||
#ifdef HAVE_XDAMAGE
|
#ifdef HAVE_XDAMAGE
|
||||||
if (e->type == Extensions::damageNotifyEvent())
|
if (e->type == Extensions::damageNotifyEvent())
|
||||||
|
@ -1672,8 +1671,7 @@ void Unmanaged::configureNotifyEvent(XConfigureEvent* e)
|
||||||
discardWindowPixmap();
|
discardWindowPixmap();
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit unmanagedGeometryShapeChanged(this, old);
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), old);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1913,8 +1913,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force, bool
|
||||||
discardWindowPixmap();
|
discardWindowPixmap();
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit clientGeometryShapeChanged(this, geom_before_block);
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), geom_before_block);
|
|
||||||
}
|
}
|
||||||
const QRect deco_rect = decorationRect().translated(geom.x(), geom.y());
|
const QRect deco_rect = decorationRect().translated(geom.x(), geom.y());
|
||||||
addWorkspaceRepaint(deco_rect_before_block);
|
addWorkspaceRepaint(deco_rect_before_block);
|
||||||
|
@ -1991,8 +1990,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force, bool emitJs)
|
||||||
discardWindowPixmap();
|
discardWindowPixmap();
|
||||||
if (scene != NULL)
|
if (scene != NULL)
|
||||||
scene->windowGeometryShapeChanged(this);
|
scene->windowGeometryShapeChanged(this);
|
||||||
if (effects != NULL)
|
emit clientGeometryShapeChanged(this, geom_before_block);
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->windowGeometryShapeChanged(effectWindow(), geom_before_block);
|
|
||||||
const QRect deco_rect = decorationRect().translated(geom.x(), geom.y());
|
const QRect deco_rect = decorationRect().translated(geom.x(), geom.y());
|
||||||
addWorkspaceRepaint(deco_rect_before_block);
|
addWorkspaceRepaint(deco_rect_before_block);
|
||||||
addWorkspaceRepaint(deco_rect);
|
addWorkspaceRepaint(deco_rect);
|
||||||
|
|
|
@ -139,10 +139,6 @@ void Effect::windowDamaged(EffectWindow*, const QRect&)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Effect::windowGeometryShapeChanged(EffectWindow*, const QRect&)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Effect::borderActivated(ElectricBorder)
|
bool Effect::borderActivated(ElectricBorder)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -444,7 +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 windowDamaged(EffectWindow* w, const QRect& r);
|
virtual void windowDamaged(EffectWindow* w, const QRect& r);
|
||||||
virtual void windowGeometryShapeChanged(EffectWindow* w, const QRect& old);
|
|
||||||
virtual void mouseChanged(const QPoint& pos, const QPoint& oldpos,
|
virtual 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);
|
||||||
|
@ -856,14 +855,29 @@ Q_SIGNALS:
|
||||||
* @since 4.7
|
* @since 4.7
|
||||||
**/
|
**/
|
||||||
void windowDeleted(EffectWindow *w);
|
void windowDeleted(EffectWindow *w);
|
||||||
/** Signal emitted when window moved/resized or once after it's finished.
|
/**
|
||||||
|
* Signal emitted when window moved/resized or once after it's finished.
|
||||||
* If both @p first and @p last are true, @p w got maximized/restored.
|
* If both @p first and @p last are true, @p w got maximized/restored.
|
||||||
|
* This signal is emitted during user interaction and not when the window
|
||||||
|
* changes it's size itself. The latter case triggers the windowGeometryShapeChanged signal.
|
||||||
* @param w The window which is being moved or resized
|
* @param w The window which is being moved or resized
|
||||||
* @param first @c true if first change
|
* @param first @c true if first change
|
||||||
* @param last @c true if last change, that is move/resize finished.
|
* @param last @c true if last change, that is move/resize finished.
|
||||||
|
* @see windowGeometryShapeChanged
|
||||||
* @since 4.7
|
* @since 4.7
|
||||||
**/
|
**/
|
||||||
void windowUserMovedResized(EffectWindow *w, bool first, bool last);
|
void windowUserMovedResized(EffectWindow *w, bool first, bool last);
|
||||||
|
/**
|
||||||
|
* Signal emitted when the geometry or shape of a window changed.
|
||||||
|
* This is caused if the window changes geometry without user interaction.
|
||||||
|
* E.g. the decoration is changed. This is in opposite to windowUserMovedResized
|
||||||
|
* which is caused by direct user interaction.
|
||||||
|
* @param w The window whose geometry changed
|
||||||
|
* @param old The previous geometry
|
||||||
|
* @see windowUserMovedResized
|
||||||
|
* @since 4.7
|
||||||
|
**/
|
||||||
|
void windowGeometryShapeChanged(EffectWindow *w, const QRect &old);
|
||||||
/**
|
/**
|
||||||
* Signal emitted when the windows opacity is changed.
|
* Signal emitted when the windows opacity is changed.
|
||||||
* @param w The window whose opacity level is changed.
|
* @param w The window whose opacity level is changed.
|
||||||
|
|
|
@ -48,6 +48,7 @@ protected:
|
||||||
virtual bool shouldUnredirect() const;
|
virtual bool shouldUnredirect() const;
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void unmanagedClosed(KWin::Unmanaged*);
|
void unmanagedClosed(KWin::Unmanaged*);
|
||||||
|
void unmanagedGeometryShapeChanged(KWin::Unmanaged*, const QRect&);
|
||||||
private:
|
private:
|
||||||
virtual ~Unmanaged(); // use release()
|
virtual ~Unmanaged(); // use release()
|
||||||
// handlers for X11 events
|
// handlers for X11 events
|
||||||
|
|
Loading…
Reference in a new issue