mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Try using hide media viewer workaround on Linux.
This commit is contained in:
parent
4696f731da
commit
b60e50df10
5 changed files with 11 additions and 15 deletions
|
@ -298,7 +298,7 @@ void OverlayWidget::RendererGL::paint(
|
|||
}
|
||||
|
||||
std::optional<QColor> 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<QColor> 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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 69c8353746dbb36808b8349eff0cac0f057fa2f4
|
||||
Subproject commit cd4e9d378cc98f590f814332900ec33863ffb98c
|
Loading…
Add table
Reference in a new issue