mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-22 00:57:09 +02:00
Add always on top hint for media view window
To avoid overlapping by panels in KDE
This commit is contained in:
parent
2aa0b674cd
commit
245d644cd7
1 changed files with 12 additions and 10 deletions
|
@ -345,11 +345,13 @@ OverlayWidget::OverlayWidget()
|
||||||
|
|
||||||
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(onScreenResized(int)));
|
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(onScreenResized(int)));
|
||||||
|
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
if (Platform::IsLinux()) {
|
||||||
setWindowFlags(Qt::FramelessWindowHint | Qt::MaximizeUsingFullscreenGeometryHint);
|
setWindowFlags(Qt::FramelessWindowHint
|
||||||
#else // Q_OS_UNIX && !Q_OS_MAC
|
| Qt::WindowStaysOnTopHint
|
||||||
setWindowFlags(Qt::FramelessWindowHint);
|
| Qt::MaximizeUsingFullscreenGeometryHint);
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
} else {
|
||||||
|
setWindowFlags(Qt::FramelessWindowHint);
|
||||||
|
}
|
||||||
moveToScreen();
|
moveToScreen();
|
||||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
|
@ -2280,11 +2282,11 @@ void OverlayWidget::displayFinished() {
|
||||||
updateControls();
|
updateControls();
|
||||||
if (isHidden()) {
|
if (isHidden()) {
|
||||||
Ui::Platform::UpdateOverlayed(this);
|
Ui::Platform::UpdateOverlayed(this);
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
if (Platform::IsLinux()) {
|
||||||
showFullScreen();
|
showFullScreen();
|
||||||
#else // Q_OS_UNIX && !Q_OS_MAC
|
} else {
|
||||||
show();
|
show();
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
}
|
||||||
Ui::Platform::ShowOverAll(this);
|
Ui::Platform::ShowOverAll(this);
|
||||||
activateWindow();
|
activateWindow();
|
||||||
QApplication::setActiveWindow(this);
|
QApplication::setActiveWindow(this);
|
||||||
|
|
Loading…
Add table
Reference in a new issue