diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index d74067bb5..809156ff3 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -985,10 +985,12 @@ void ChatForm::show(Ui::MainWindow &ui) callConfirm->show(); } -void ChatForm::hideEvent(QHideEvent*) +void ChatForm::hideEvent(QHideEvent* event) { if (callConfirm) callConfirm->hide(); + + GenericChatForm::hideEvent(event); } OfflineMsgEngine *ChatForm::getOfflineMsgEngine() diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index c7adcf338..bba23332f 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -410,6 +410,12 @@ void GenericChatForm::insertChatMessage(ChatMessage::Ptr msg) chatWidget->insertChatlineAtBottom(std::dynamic_pointer_cast(msg)); } +void GenericChatForm::hideEvent(QHideEvent* event) +{ + hideFileMenu(); + QWidget::hideEvent(event); +} + bool GenericChatForm::eventFilter(QObject* object, QEvent* event) { if (object != this->fileButton && object != this->fileFlyout) diff --git a/src/widget/form/genericchatform.h b/src/widget/form/genericchatform.h index 21246c83d..831aee68d 100644 --- a/src/widget/form/genericchatform.h +++ b/src/widget/form/genericchatform.h @@ -84,6 +84,7 @@ protected slots: protected: QString resolveToxID(const ToxID &id); void insertChatMessage(ChatMessage::Ptr msg); + void hideEvent(QHideEvent* event); ToxID previousId; QDateTime prevMsgDateTime;