mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
Fix viewer hide workaround for software renderer.
This commit is contained in:
parent
c51a8816eb
commit
e2e55312b8
2 changed files with 12 additions and 0 deletions
|
@ -20,10 +20,21 @@ OverlayWidget::RendererSW::RendererSW(not_null<OverlayWidget*> owner)
|
|||
, _transparentBrush(style::TransparentPlaceholder()) {
|
||||
}
|
||||
|
||||
bool OverlayWidget::RendererSW::handleHideWorkaround() {
|
||||
// This is needed on Windows or Linux,
|
||||
// because on reopen it blinks with the last shown content.
|
||||
return _owner->_hideWorkaround != nullptr;
|
||||
}
|
||||
|
||||
void OverlayWidget::RendererSW::paintFallback(
|
||||
Painter &&p,
|
||||
const QRegion &clip,
|
||||
Ui::GL::Backend backend) {
|
||||
if (handleHideWorkaround()) {
|
||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
p.fillRect(clip.boundingRect(), Qt::transparent);
|
||||
return;
|
||||
}
|
||||
_p = &p;
|
||||
_clip = &clip;
|
||||
_clipOuter = clip.boundingRect();
|
||||
|
|
|
@ -59,6 +59,7 @@ private:
|
|||
QRect rect,
|
||||
float64 opacity = 1.) override;
|
||||
|
||||
bool handleHideWorkaround();
|
||||
void validateOverControlImage();
|
||||
|
||||
[[nodiscard]] static QRect TransformRect(QRectF geometry, int rotation);
|
||||
|
|
Loading…
Add table
Reference in a new issue