diff --git a/effects.cpp b/effects.cpp index 846fcf3c69..0e62b63a92 100644 --- a/effects.cpp +++ b/effects.cpp @@ -235,7 +235,11 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene) if (!c->effectWindow()) { return; } - emit desktopPresenceChanged(c->effectWindow(), old, c->desktop()); + // the visibility update hasn't happed yet, thus the signal is delayed to prevent glitches, see also BUG 347490 + QMetaObject::invokeMethod(this, "desktopPresenceChanged", Qt::QueuedConnection, + Q_ARG(KWin::EffectWindow*, c->effectWindow()), + Q_ARG(int, old), + Q_ARG(int, c->desktop())); } ); connect(ws, &Workspace::clientAdded, this, diff --git a/workspace.cpp b/workspace.cpp index 2d5ece1f95..2b28838ebc 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -466,7 +466,7 @@ Client* Workspace::createClient(xcb_window_t w, bool is_mapped) connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), m_compositor, SLOT(checkUnredirect())); connect(c, SIGNAL(blockingCompositingChanged(KWin::Client*)), m_compositor, SLOT(updateCompositeBlocking(KWin::Client*))); connect(c, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), ScreenEdges::self(), SIGNAL(checkBlocking())); - connect(c, &Client::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged, Qt::QueuedConnection); + connect(c, &Client::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged); if (!c->manage(w, is_mapped)) { Client::deleteClient(c); return NULL;