diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-08-22 13:11:51 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-08-22 13:11:51 (GMT) |
commit | 9bd0d4220e8b8e7a1714536d9e4d6c6e61727d85 (patch) | |
tree | 3d45cbd12b1ef310711fea4b93c85f36eab6b178 /Swift/QtUI/QtChatWindow.cpp | |
parent | d786e1aeff062ef4f0a962d55ddce7d41c5f512e (diff) | |
download | swift-contrib-9bd0d4220e8b8e7a1714536d9e4d6c6e61727d85.zip swift-contrib-9bd0d4220e8b8e7a1714536d9e4d6c6e61727d85.tar.bz2 |
Don't incorrectly mark all messages read in most recently opened chat when a different chat is selected
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 5b73fec..de681d5 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -82,7 +82,6 @@ QtChatWindow::QtChatWindow(const QString &contact, UIEventStream* eventStream) : connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), this, SLOT(qAppFocusChanged(QWidget*, QWidget*))); connect(messageLog_, SIGNAL(gotFocus()), input_, SLOT(setFocus())); resize(400,300); - input_->setFocus(); } QtChatWindow::~QtChatWindow() { @@ -194,6 +193,7 @@ void QtChatWindow::qAppFocusChanged(QWidget *old, QWidget *now) { Q_UNUSED(old); Q_UNUSED(now); if (isWidgetSelected()) { + input_->setFocus(); onAllMessagesRead(); } @@ -351,7 +351,6 @@ void QtChatWindow::handleInputChanged() { void QtChatWindow::show() { QWidget::show(); emit windowOpening(); - input_->setFocus(); } void QtChatWindow::activate() { |