fix: don't ignore mousePressEvent in SplitInput (#4177)

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
Fixes https://github.com/Chatterino/chatterino2/issues/3844
This commit is contained in:
nerix 2022-11-21 19:27:56 +01:00 committed by GitHub
parent 518262596a
commit 254f89f935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View file

@ -3,6 +3,7 @@
## Unversioned ## Unversioned
- Bugfix: Fixed being unable to see the usercard of VIPs who have Asian language display names. (#4174) - Bugfix: Fixed being unable to see the usercard of VIPs who have Asian language display names. (#4174)
- Bugfix: Fixed the wrong right-click menu showing in the chat input box. (#4177)
## 2.4.0-beta ## 2.4.0-beta

View file

@ -648,6 +648,16 @@ void SplitInput::installKeyPressedEvent()
}); });
} }
void SplitInput::mousePressEvent(QMouseEvent *event)
{
if (this->hidden)
{
BaseWidget::mousePressEvent(event);
}
// else, don't call QWidget::mousePressEvent,
// which will call event->ignore()
}
void SplitInput::onTextChanged() void SplitInput::onTextChanged()
{ {
this->updateCompletionPopup(); this->updateCompletionPopup();

View file

@ -87,6 +87,8 @@ protected:
void paintEvent(QPaintEvent * /*event*/) override; void paintEvent(QPaintEvent * /*event*/) override;
void resizeEvent(QResizeEvent * /*event*/) override; void resizeEvent(QResizeEvent * /*event*/) override;
void mousePressEvent(QMouseEvent *event) override;
virtual void giveFocus(Qt::FocusReason reason); virtual void giveFocus(Qt::FocusReason reason);
QString handleSendMessage(std::vector<QString> &arguments); QString handleSendMessage(std::vector<QString> &arguments);