Each MainWindow has its own Global Menu.

This commit is contained in:
John Preston 2023-01-18 14:53:41 +04:00
parent ba520aadcb
commit b3667d69a1
2 changed files with 8 additions and 1 deletions

View File

@ -213,7 +213,8 @@ MainWindow::Private::~Private() {
MainWindow::MainWindow(not_null<Window::Controller*> controller)
: Window::MainWindow(controller)
, _private(std::make_unique<Private>(this)) {
, _private(std::make_unique<Private>(this))
, psMainMenu(this) {
auto forceOpenGL = std::make_unique<QOpenGLWidget>(this);
_hideAfterFullScreenTimer.setCallback([this] { hideAndDeactivate(); });
}

View File

@ -1688,6 +1688,9 @@ void SessionController::showPeerHistory(
const SectionShow &params,
MsgId msgId) {
content()->showPeerHistory(peerId, params, msgId);
if (peerId && params.activation != anim::activation::background) {
_window->activate();
}
}
void SessionController::showMessage(
@ -1705,6 +1708,9 @@ void SessionController::showMessage(
} else {
controller->content()->showMessage(item, params);
}
if (params.activation != anim::activation::background) {
controller->window().activate();
}
});
}