diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp index 96266c841..6df2da00c 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp @@ -298,7 +298,7 @@ void OverlayWidget::RendererGL::paint( } std::optional OverlayWidget::RendererGL::clearColor() { - if (Platform::IsWindows() && _owner->_hideWorkaround) { + if (_owner->_hideWorkaround) { return QColor(0, 0, 0, 0); } else if (_owner->_fullScreenVideo) { return st::mediaviewVideoBg->c; @@ -308,9 +308,9 @@ std::optional OverlayWidget::RendererGL::clearColor() { } bool OverlayWidget::RendererGL::handleHideWorkaround(QOpenGLFunctions &f) { - // This is needed on Windows, + // This is needed on Windows or Linux, // because on reopen it blinks with the last shown content. - return Platform::IsWindows() && _owner->_hideWorkaround; + return _owner->_hideWorkaround != nullptr; } void OverlayWidget::RendererGL::paintBackground() { diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index bc08eb778..3a56a1b11 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -27,7 +27,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/image/image.h" #include "ui/layers/layer_manager.h" #include "ui/text/text_utilities.h" -#include "ui/platform/ui_platform_utility.h" #include "ui/platform/ui_platform_window_title.h" #include "ui/toast/toast.h" #include "ui/text/format_values.h" @@ -3584,11 +3583,6 @@ void OverlayWidget::displayFinished(anim::activation activation) { if (isHidden()) { _helper->beforeShow(_fullscreen); moveToScreen(); - //setAttribute(Qt::WA_DontShowOnScreen); - //OverlayParent::setVisibleHook(true); - //OverlayParent::setVisibleHook(false); - //setAttribute(Qt::WA_DontShowOnScreen, false); - //Ui::Platform::UpdateOverlayed(_window); showAndActivate(); } else if (activation == anim::activation::background) { return; @@ -6077,10 +6071,12 @@ void OverlayWidget::applyHideWindowWorkaround() { }); }, raw->lifetime()); raw->update(); + _widget->update(); - if (Platform::IsWindows()) { - Ui::Platform::UpdateOverlayed(_window); + if (!Platform::IsMac()) { + Ui::ForceFullRepaintSync(_window); } + _hideWorkaround = nullptr; } } @@ -6147,10 +6143,10 @@ void OverlayWidget::clearBeforeHide() { _helper->setControlsOpacity(1.); _groupThumbs = nullptr; _groupThumbsRect = QRect(); - _body->hide(); } void OverlayWidget::clearAfterHide() { + _body->hide(); clearStreaming(); destroyThemePreview(); _radial.stop(); diff --git a/Telegram/SourceFiles/settings/settings_scale_preview.cpp b/Telegram/SourceFiles/settings/settings_scale_preview.cpp index 7e840e31c..efb797fee 100644 --- a/Telegram/SourceFiles/settings/settings_scale_preview.cpp +++ b/Telegram/SourceFiles/settings/settings_scale_preview.cpp @@ -192,7 +192,7 @@ void Preview::toggle(ScalePreviewShow show, int scale, int sliderX) { updateToScale(scale); updateGlobalPosition(sliderX); if (_widget.isHidden()) { - Ui::Platform::UpdateOverlayed(&_widget); + Ui::ForceFullRepaintSync(&_widget); } toggleShown(true); } diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 23bc44f64..c1d484374 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -582,7 +582,7 @@ void Widget::addToHeight(int add) { auto newHeight = height() + add; auto newPosition = computePosition(newHeight); updateGeometry(newPosition.x(), newPosition.y(), width(), newHeight); - Ui::Platform::UpdateOverlayed(this); + Ui::ForceFullRepaintSync(this); } void Widget::updateGeometry(int x, int y, int width, int height) { diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 69c835374..cd4e9d378 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 69c8353746dbb36808b8349eff0cac0f057fa2f4 +Subproject commit cd4e9d378cc98f590f814332900ec33863ffb98c