Disabled forced session switching when closing PiP.

Regression was introduced in 7decf68122.
This commit is contained in:
23rd 2021-07-26 18:54:58 +03:00
parent 82165bec5e
commit 7c8b1cd5b1
2 changed files with 4 additions and 4 deletions

View file

@ -3103,7 +3103,7 @@ void OverlayWidget::switchToPip() {
const auto closeAndContinue = [=] {
_showAsPip = false;
show(OpenRequest(
findWindow(),
findWindow(false),
document,
document->owner().message(msgId),
true));
@ -4536,7 +4536,7 @@ void OverlayWidget::applyHideWindowWorkaround() {
}
}
Window::SessionController *OverlayWidget::findWindow() const {
Window::SessionController *OverlayWidget::findWindow(bool switchTo) const {
if (!_session) {
return nullptr;
}
@ -4553,7 +4553,7 @@ Window::SessionController *OverlayWidget::findWindow() const {
const auto &active = _session->windows();
if (!active.empty()) {
return active.front();
} else if (window) {
} else if (window && switchTo) {
Window::SessionController *controllerPtr = nullptr;
window->invokeForSessionController(
&_session->account(),

View file

@ -411,7 +411,7 @@ private:
void applyHideWindowWorkaround();
Window::SessionController *findWindow() const;
Window::SessionController *findWindow(bool switchTo = true) const;
bool _opengl = false;
const std::unique_ptr<Ui::RpWidgetWrap> _surface;