fix focus delay optimization
This commit is contained in:
parent
9ea4b566fe
commit
e1a63303b6
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue