2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Move some logic to Media::Streaming::Player.

This commit is contained in:
John Preston
2019-02-17 10:54:57 +04:00
parent 64f2f330f6
commit a093cb6274
12 changed files with 633 additions and 493 deletions

View File

@@ -302,13 +302,18 @@ void MainWindow::destroyLayer() {
if (!_layer) {
return;
}
const auto resetFocus = Ui::InFocusChain(_layer);
if (resetFocus) setFocus();
_layer = nullptr;
auto layer = base::take(_layer);
const auto resetFocus = Ui::InFocusChain(layer);
if (resetFocus) {
setFocus();
}
layer = nullptr;
if (controller()) {
controller()->disableGifPauseReason(Window::GifPauseReason::Layer);
}
if (resetFocus) setInnerFocus();
if (resetFocus) {
setInnerFocus();
}
InvokeQueued(this, [=] {
checkHistoryActivation();
});