mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Disabled forced session switching when closing PiP.
Regression was introduced in 7decf68122
.
This commit is contained in:
parent
82165bec5e
commit
7c8b1cd5b1
2 changed files with 4 additions and 4 deletions
|
@ -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(),
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue