summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-01-19 15:39:54 (GMT)
committerSwift Review <review@swift.im>2015-02-09 22:05:06 (GMT)
commit6a4e622d9c406ea45bcc8c9740f666ad4a7e589f (patch)
tree917e8b041cb3cbf3af18e82001b57b5e770fdb6f /Swift/QtUI/QtChatWindow.cpp
parent672e56cd731d1cbc08941bf98d76699cd9fc4514 (diff)
downloadswift-6a4e622d9c406ea45bcc8c9740f666ad4a7e589f.zip
swift-6a4e622d9c406ea45bcc8c9740f666ad4a7e589f.tar.bz2
Fix focus handling bug with regard to tab changing
QtChatWindow: Require now parameter is set in QtChatWindow::qAppFocusChanged which is required so only the visible tab that is changed to gets focus. QtDynamicGridLayout: A change of tab in a QTabWidget set focus on the new tab even if the QTabWidget has no keyboard focus. Test-Information: Tested on Mac OS X 10.9.5 and Qt 5.4.0. Change-Id: I3d9d230c7753f1898b251b49c06fe7318ad953fb
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index da1cf18..6324e9d 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -446,8 +446,8 @@ void QtChatWindow::convertToMUC(MUCType mucType) {
subject_->setVisible(!impromptu_);
}
-void QtChatWindow::qAppFocusChanged(QWidget* /*old*/, QWidget* /*now*/) {
- if (isWidgetSelected()) {
+void QtChatWindow::qAppFocusChanged(QWidget* /*old*/, QWidget* now) {
+ if (now && isWidgetSelected()) {
lastLineTracker_.setHasFocus(true);
input_->setFocus();
onAllMessagesRead();