delay adding Unmanaged clients by 50ms
This provides some sort of synthetic XSYNC support for unmanaged clients and allows them to do an initial update after mapping and before being painted (prevent flicker) Also it helps with Unmanaged clients performing quick map/unmap/map cycles what also seems to induce the black window issue on the nvidia blob. CCBUG: 284888 BUG: 319184 FIXED-IN: 4.11 REVIEW: 111292icc-effect-5.14.5
parent
f71457b2cf
commit
a3d502338d
14
effects.cpp
14
effects.cpp
|
@ -555,9 +555,9 @@ void EffectsHandlerImpl::slotClientAdded(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotUnmanagedAdded(Unmanaged *u)
|
void EffectsHandlerImpl::slotUnmanagedAdded(Unmanaged *u)
|
||||||
{ // regardless, unmanaged windows are -yet?- not synced anyway
|
{
|
||||||
setupUnmanagedConnections(u);
|
// it's never initially ready but has synthetic 50ms delay
|
||||||
emit windowAdded(u->effectWindow());
|
connect(u, SIGNAL(windowShown(KWin::Toplevel*)), SLOT(slotUnmanagedShown(KWin::Toplevel*)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
||||||
|
@ -569,6 +569,14 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
||||||
emit windowAdded(c->effectWindow());
|
emit windowAdded(c->effectWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
|
||||||
|
{ // regardless, unmanaged windows are -yet?- not synced anyway
|
||||||
|
Q_ASSERT(dynamic_cast<Unmanaged*>(t));
|
||||||
|
Unmanaged *u = static_cast<Unmanaged*>(t);
|
||||||
|
setupUnmanagedConnections(u);
|
||||||
|
emit windowAdded(u->effectWindow());
|
||||||
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotDeletedRemoved(KWin::Deleted *d)
|
void EffectsHandlerImpl::slotDeletedRemoved(KWin::Deleted *d)
|
||||||
{
|
{
|
||||||
emit windowDeleted(d->effectWindow());
|
emit windowDeleted(d->effectWindow());
|
||||||
|
|
|
@ -217,6 +217,7 @@ protected Q_SLOTS:
|
||||||
void slotClientAdded(KWin::Client *c);
|
void slotClientAdded(KWin::Client *c);
|
||||||
void slotClientShown(KWin::Toplevel*);
|
void slotClientShown(KWin::Toplevel*);
|
||||||
void slotUnmanagedAdded(KWin::Unmanaged *u);
|
void slotUnmanagedAdded(KWin::Unmanaged *u);
|
||||||
|
void slotUnmanagedShown(KWin::Toplevel*);
|
||||||
void slotWindowClosed(KWin::Toplevel *c);
|
void slotWindowClosed(KWin::Toplevel *c);
|
||||||
void slotClientActivated(KWin::Client *c);
|
void slotClientActivated(KWin::Client *c);
|
||||||
void slotDeletedRemoved(KWin::Deleted *d);
|
void slotDeletedRemoved(KWin::Deleted *d);
|
||||||
|
|
|
@ -342,6 +342,7 @@ protected Q_SLOTS:
|
||||||
void checkScreen();
|
void checkScreen();
|
||||||
void setupCheckScreenConnection();
|
void setupCheckScreenConnection();
|
||||||
void removeCheckScreenConnection();
|
void removeCheckScreenConnection();
|
||||||
|
void setReadyForPainting();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~Toplevel();
|
virtual ~Toplevel();
|
||||||
|
@ -353,7 +354,6 @@ protected:
|
||||||
void addDamageFull();
|
void addDamageFull();
|
||||||
void getWmClientLeader();
|
void getWmClientLeader();
|
||||||
void getWmClientMachine();
|
void getWmClientMachine();
|
||||||
void setReadyForPainting();
|
|
||||||
/**
|
/**
|
||||||
* @returns Whether there is a compositor and it is active.
|
* @returns Whether there is a compositor and it is active.
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "deleted.h"
|
#include "deleted.h"
|
||||||
#include "xcbutils.h"
|
#include "xcbutils.h"
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
|
@ -35,7 +36,9 @@ namespace KWin
|
||||||
Unmanaged::Unmanaged()
|
Unmanaged::Unmanaged()
|
||||||
: Toplevel()
|
: Toplevel()
|
||||||
{
|
{
|
||||||
|
ready_for_painting = false;
|
||||||
connect(this, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), SIGNAL(geometryChanged()));
|
connect(this, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), SIGNAL(geometryChanged()));
|
||||||
|
QTimer::singleShot(50, this, SLOT(setReadyForPainting()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Unmanaged::~Unmanaged()
|
Unmanaged::~Unmanaged()
|
||||||
|
|
Loading…
Reference in New Issue