Workaround force setting of WM_TRANSIENT_HINT in Qt's xcb backend

This commit is contained in:
Ilya Fedin 2021-04-02 15:32:08 +04:00 committed by John Preston
parent 0e126e2550
commit 75a782cced
2 changed files with 13 additions and 1 deletions

View File

@ -387,7 +387,17 @@ PipPanel::PipPanel(
Ui::Platform::InitOnTopPanel(this);
setMouseTracking(true);
resize(0, 0);
show();
hide();
createWinId();
}
void PipPanel::setVisibleHook(bool visible) {
PipParent::setVisibleHook(visible);
// workaround Qt's forced transient parent
if (visible) {
Ui::Platform::ClearTransientParent(this);
}
}
void PipPanel::setAspectRatio(QSize ratio) {

View File

@ -78,6 +78,8 @@ protected:
void mouseReleaseEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void setVisibleHook(bool visible) override;
private:
void setPositionDefault();
void setPositionOnScreen(Position position, QRect available);