fix focus delay optimization

This commit is contained in:
Thomas Lübking 2011-12-06 13:15:06 +01:00
parent 9ea4b566fe
commit e1a63303b6

View file

@ -1831,12 +1831,13 @@ void Workspace::delayFocus()
void Workspace::requestDelayFocus(Client* c)
{
delayfocus_client = c;
delete delayFocusTimer;
if (!options->delayFocusInterval) {
delayFocusTimer = 0;
QMetaObject::invokeMethod(this, "delayFocus", Qt::QueuedConnection);
return;
}
delayfocus_client = c;
delete delayFocusTimer;
delayFocusTimer = new QTimer(this);
connect(delayFocusTimer, SIGNAL(timeout()), this, SLOT(delayFocus()));
delayFocusTimer->setSingleShot(true);