From 47f27c607a7fb04495d402c6059664250d452a81 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Mon, 12 Oct 2009 09:04:20 +0100
Subject: Fix for chat tabs always getting focus on incoming messages


diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
index e36b65b..00d07c8 100644
--- a/Swift/QtUI/QtChatTabs.cpp
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -46,7 +46,6 @@ void QtChatTabs::handleWidgetShown() {
 		return;
 	}
 	if (tabs_->indexOf(widget) >= 0) {
-		widget->setFocus();
 		return;
 	}
 	addTab(widget);
@@ -61,6 +60,7 @@ void QtChatTabs::handleWantsToActivate() {
 	setWindowState(windowState() & ~Qt::WindowMinimized);
 	setWindowState(windowState() | Qt::WindowActive);
 	tabs_->setCurrentWidget(widget);
+	widget->setFocus();
 	activateWindow();
 }
 
-- 
cgit v0.10.2-6-g49f6