diff options
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index d7d5f690a..fe20fe935 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -731,9 +731,19 @@ void ChatWindow::mousePressed(MouseEvent &event) if (event.getButton() == MouseButton::LEFT) { - const ChatTab *const tab = getFocused(); - if (tab) - mMoved = !isResizeAllowed(event); + const int clicks = event.getClickCount(); + if (clicks == 2) + { + toggleChatFocus(); + if (gui) + gui->resetClickCount(); + } + else if (clicks == 1) + { + const ChatTab *const tab = getFocused(); + if (tab) + mMoved = !isResizeAllowed(event); + } } mDragOffsetX = event.getX(); @@ -2185,6 +2195,14 @@ void ChatWindow::showGMTab() } } +void ChatWindow::toggleChatFocus() +{ + if (mChatInput->isVisible() && mChatInput->isFocused()) + mChatInput->processVisible(Visible_false); + else + requestChatFocus(); +} + #ifdef EATHENA_SUPPORT void ChatWindow::joinRoom(const bool isJoin) { |