mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: fix stay-on-top on Linux
This commit is contained in:
parent
4066ffb4f4
commit
f9badfbb55
@ -3202,12 +3202,7 @@ void VMainWindow::stayOnTop(bool p_enabled)
|
|||||||
bool shown = isVisible();
|
bool shown = isVisible();
|
||||||
Qt::WindowFlags flags = this->windowFlags();
|
Qt::WindowFlags flags = this->windowFlags();
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
|
|
||||||
Qt::WindowFlags magicFlag = Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint;
|
|
||||||
#else
|
|
||||||
Qt::WindowFlags magicFlag = Qt::WindowStaysOnTopHint;
|
Qt::WindowFlags magicFlag = Qt::WindowStaysOnTopHint;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (p_enabled) {
|
if (p_enabled) {
|
||||||
setWindowFlags(flags | magicFlag);
|
setWindowFlags(flags | magicFlag);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user