diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-04-06 20:16:57 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-04-06 20:37:15 (GMT) |
commit | f3e75e58e57e5a49a79da8a88d25f17c784812b6 (patch) | |
tree | e8e4857049212367441b4469937631cbe61f1178 /Swift/QtUI/QtChatTabs.cpp | |
parent | 725c4e1ad0710606421f9705d994688116a9fc1f (diff) | |
download | swift-contrib-f3e75e58e57e5a49a79da8a88d25f17c784812b6.zip swift-contrib-f3e75e58e57e5a49a79da8a88d25f17c784812b6.tar.bz2 |
Don't minimise+restore new chats that want focus on OS X.
Resolves: 217
Diffstat (limited to 'Swift/QtUI/QtChatTabs.cpp')
-rw-r--r-- | Swift/QtUI/QtChatTabs.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp index 67cd8ae..8ce4ac8 100644 --- a/Swift/QtUI/QtChatTabs.cpp +++ b/Swift/QtUI/QtChatTabs.cpp @@ -49,6 +49,7 @@ void QtChatTabs::handleWidgetShown() { if (!widget) { return; } + checkForFirstShow(); if (tabs_->indexOf(widget) >= 0) { return; } @@ -59,10 +60,11 @@ void QtChatTabs::handleWidgetShown() { void QtChatTabs::handleWantsToActivate() { QtTabbable* widget = qobject_cast<QtTabbable*>(sender()); Q_ASSERT(widget); - Q_ASSERT(tabs_->indexOf(widget) >= 0); //Un-minimize and bring to front. setWindowState(windowState() & ~Qt::WindowMinimized); setWindowState(windowState() | Qt::WindowActive); + show(); + widget->show(); tabs_->setCurrentWidget(widget); widget->setFocus(); activateWindow(); @@ -124,4 +126,10 @@ void QtChatTabs::moveEvent(QMoveEvent*) { emit geometryChanged(); } +void QtChatTabs::checkForFirstShow() { + if (!isVisible()) { + showMinimized(); + } +} + } |