mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
Each MainWindow has its own Global Menu.
This commit is contained in:
parent
ba520aadcb
commit
b3667d69a1
2 changed files with 8 additions and 1 deletions
|
@ -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(); });
|
||||
}
|
||||
|
|
|
@ -1688,6 +1688,9 @@ void SessionController::showPeerHistory(
|
|||
const SectionShow ¶ms,
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue