Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't ignore mousePressEvent in SplitInput #4177

Merged
merged 4 commits into from Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@
## Unversioned

- 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

Expand Down
10 changes: 10 additions & 0 deletions src/widgets/splits/SplitInput.cpp
Expand Up @@ -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()
{
this->updateCompletionPopup();
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/splits/SplitInput.hpp
Expand Up @@ -87,6 +87,8 @@ class SplitInput : public BaseWidget
void paintEvent(QPaintEvent * /*event*/) override;
void resizeEvent(QResizeEvent * /*event*/) override;

void mousePressEvent(QMouseEvent *event) override;

virtual void giveFocus(Qt::FocusReason reason);

QString handleSendMessage(std::vector<QString> &arguments);
Expand Down