mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed clicking on splits to focus them
This commit is contained in:
parent
a4995201f5
commit
3e9f71dbf9
|
@ -681,6 +681,8 @@ void ChannelView::mousePressEvent(QMouseEvent *event)
|
|||
QPoint relativePos;
|
||||
int messageIndex;
|
||||
|
||||
this->mouseDown(event);
|
||||
|
||||
if (!tryGetMessageAt(event->pos(), message, relativePos, messageIndex)) {
|
||||
setCursor(Qt::ArrowCursor);
|
||||
|
||||
|
|
|
@ -96,6 +96,8 @@ public:
|
|||
|
||||
void clearMessages();
|
||||
|
||||
boost::signals2::signal<void(QMouseEvent *)> mouseDown;
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent(QResizeEvent *) override;
|
||||
|
||||
|
|
|
@ -82,9 +82,7 @@ ChatWidget::ChatWidget(ChannelManager &_channelManager, NotebookPage *parent)
|
|||
|
||||
this->input.textInput.installEventFilter(parent);
|
||||
|
||||
connect(&view, &this->view.mousePressEvent, this, [&](QMouseEvent *) {
|
||||
QTimer::singleShot(10, [this] { this->giveFocus(Qt::MouseFocusReason); });
|
||||
});
|
||||
this->view.mouseDown.connect([this](QMouseEvent *) { this->giveFocus(Qt::MouseFocusReason); });
|
||||
}
|
||||
|
||||
ChatWidget::~ChatWidget()
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include "emotemanager.hpp"
|
||||
#include "resizingtextedit.hpp"
|
||||
#include "widgets/basewidget.hpp"
|
||||
#include "widgets/rippleeffectlabel.hpp"
|
||||
#include "widgets/emotepopup.hpp"
|
||||
#include "widgets/rippleeffectlabel.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
|
Loading…
Reference in a new issue