2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Don't collapse chats list on window unfocus.

This commit is contained in:
John Preston
2024-04-08 15:52:45 +04:00
parent 39658ffe52
commit 11e4c45969
3 changed files with 22 additions and 8 deletions

View File

@@ -2624,7 +2624,11 @@ bool MainWidget::eventFilter(QObject *o, QEvent *e) {
const auto widget = o->isWidgetType()
? static_cast<QWidget*>(o)
: nullptr;
if (e->type() == QEvent::MouseButtonPress) {
if (e->type() == QEvent::FocusIn) {
if (widget && _dialogs && widget->window() == window()) {
_dialogs->updateHasFocus(widget);
}
} else if (e->type() == QEvent::MouseButtonPress) {
if (widget && (widget->window() == window())) {
const auto event = static_cast<QMouseEvent*>(e);
if (event->button() == Qt::BackButton) {