Call moveToScreen from handleVisibleChanged in OverlayWidget

This commit is contained in:
Ilya Fedin 2020-12-13 09:30:41 +04:00 committed by John Preston
parent 78a666a19d
commit c9d2ef278f
1 changed files with 1 additions and 7 deletions

View File

@ -1322,7 +1322,7 @@ void OverlayWidget::onScreenResized(int screen) {
void OverlayWidget::handleVisibleChanged(bool visible) { void OverlayWidget::handleVisibleChanged(bool visible) {
if (visible) { if (visible) {
updateGeometry(); moveToScreen();
} }
} }
@ -2186,9 +2186,6 @@ void OverlayWidget::displayPhoto(not_null<PhotoData*> photo, HistoryItem *item)
displayDocument(nullptr, item); displayDocument(nullptr, item);
return; return;
} }
if (isHidden()) {
moveToScreen();
}
_touchbarDisplay.fire(TouchBarItemType::Photo); _touchbarDisplay.fire(TouchBarItemType::Photo);
clearStreaming(); clearStreaming();
@ -2255,9 +2252,6 @@ void OverlayWidget::displayDocument(
HistoryItem *item, HistoryItem *item,
const Data::CloudTheme &cloud, const Data::CloudTheme &cloud,
bool continueStreaming) { bool continueStreaming) {
if (isHidden()) {
moveToScreen();
}
_fullScreenVideo = false; _fullScreenVideo = false;
_staticContent = QPixmap(); _staticContent = QPixmap();
clearStreaming(_document != doc); clearStreaming(_document != doc);