mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Each MainWindow has its own Global Menu.
This commit is contained in:
@@ -213,7 +213,8 @@ MainWindow::Private::~Private() {
|
|||||||
|
|
||||||
MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||||
: Window::MainWindow(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);
|
auto forceOpenGL = std::make_unique<QOpenGLWidget>(this);
|
||||||
_hideAfterFullScreenTimer.setCallback([this] { hideAndDeactivate(); });
|
_hideAfterFullScreenTimer.setCallback([this] { hideAndDeactivate(); });
|
||||||
}
|
}
|
||||||
|
@@ -1688,6 +1688,9 @@ void SessionController::showPeerHistory(
|
|||||||
const SectionShow ¶ms,
|
const SectionShow ¶ms,
|
||||||
MsgId msgId) {
|
MsgId msgId) {
|
||||||
content()->showPeerHistory(peerId, params, msgId);
|
content()->showPeerHistory(peerId, params, msgId);
|
||||||
|
if (peerId && params.activation != anim::activation::background) {
|
||||||
|
_window->activate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SessionController::showMessage(
|
void SessionController::showMessage(
|
||||||
@@ -1705,6 +1708,9 @@ void SessionController::showMessage(
|
|||||||
} else {
|
} else {
|
||||||
controller->content()->showMessage(item, params);
|
controller->content()->showMessage(item, params);
|
||||||
}
|
}
|
||||||
|
if (params.activation != anim::activation::background) {
|
||||||
|
controller->window().activate();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user