From e1a63303b6abb0b37a44351ab2ef38f759492274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Tue, 6 Dec 2011 13:15:06 +0100 Subject: [PATCH] fix focus delay optimization --- workspace.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index fb1496866e..3ef12a0e39 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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);