summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-09-08 07:59:58 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-09-18 08:07:39 (GMT)
commit9be5ebf772f03cdaea50bf33b70f30dd4f1c0dd2 (patch)
tree66594d99a94f1a23d4581c245d7829719061301c /Swift/QtUI/QtChatWindow.cpp
parent950881debd593de9b6d483894246af9ad0c9b1d9 (diff)
downloadswift-9be5ebf772f03cdaea50bf33b70f30dd4f1c0dd2.zip
swift-9be5ebf772f03cdaea50bf33b70f30dd4f1c0dd2.tar.bz2
Set keyboard focus to text input after selecting an emoticon
After selecting an emoticon on Windows the keyboard focus does not return to the text input. OS X did not exhibit that behavior. This fix explicitly sets the focus back to the text input after selection of an emoticon, as expected by the user. Test-Information: Verified the behavior on OS X 10.9.5 and Windows 7, both with Qt 5.4.2. Change-Id: I8737a7e3f6d1a6b7a8e60261e9bd14c7be8d07a6
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index ffcbf15..3818991 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -47,10 +47,11 @@
47 47
48#include <SwifTools/TabComplete.h> 48#include <SwifTools/TabComplete.h>
49 49
50#include <Swift/QtUI/QtAddBookmarkWindow.h> 50#include <Swift/QtUI/QtAddBookmarkWindow.h>
51#include <Swift/QtUI/QtEditBookmarkWindow.h> 51#include <Swift/QtUI/QtEditBookmarkWindow.h>
52#include <Swift/QtUI/QtEmoticonsGrid.h>
52#include <Swift/QtUI/QtPlainChatView.h> 53#include <Swift/QtUI/QtPlainChatView.h>
53#include <Swift/QtUI/QtScaledAvatarCache.h> 54#include <Swift/QtUI/QtScaledAvatarCache.h>
54#include <Swift/QtUI/QtSettingsProvider.h> 55#include <Swift/QtUI/QtSettingsProvider.h>
55#include <Swift/QtUI/QtTextEdit.h> 56#include <Swift/QtUI/QtTextEdit.h>
56#include <Swift/QtUI/QtUISettingConstants.h> 57#include <Swift/QtUI/QtUISettingConstants.h>
@@ -643,10 +644,11 @@ void QtChatWindow::handleEmoticonsButtonClicked() {
643 emoticonsMenu_->exec(QPoint(QCursor::pos().x() - menuSize.width(), QCursor::pos().y() - menuSize.height())); 644 emoticonsMenu_->exec(QPoint(QCursor::pos().x() - menuSize.width(), QCursor::pos().y() - menuSize.height()));
644} 645}
645 646
646void QtChatWindow::handleEmoticonClicked(QString emoticonAsText) { 647void QtChatWindow::handleEmoticonClicked(QString emoticonAsText) {
647 input_->textCursor().insertText(emoticonAsText); 648 input_->textCursor().insertText(emoticonAsText);
649 input_->setFocus();
648} 650}
649 651
650void QtChatWindow::handleTextInputReceivedFocus() { 652void QtChatWindow::handleTextInputReceivedFocus() {
651 lastLineTracker_.setHasFocus(true); 653 lastLineTracker_.setHasFocus(true);
652 input_->setFocus(); 654 input_->setFocus();