Added Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint for dock overlay for linux

This commit is contained in:
Uwe Kindler 2019-11-28 13:05:09 +01:00
parent 4f97e07eb6
commit bddf4c417d

View File

@ -332,7 +332,11 @@ CDockOverlay::CDockOverlay(QWidget* parent, eMode Mode) :
{ {
d->Mode = Mode; d->Mode = Mode;
d->Cross = new CDockOverlayCross(this); d->Cross = new CDockOverlayCross(this);
#ifdef Q_OS_LINUX
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
#else
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint); setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
#endif
setWindowOpacity(1); setWindowOpacity(1);
setWindowTitle("DockOverlay"); setWindowTitle("DockOverlay");
setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_NoSystemBackground);
@ -573,7 +577,11 @@ CDockOverlayCross::CDockOverlayCross(CDockOverlay* overlay) :
d(new DockOverlayCrossPrivate(this)) d(new DockOverlayCrossPrivate(this))
{ {
d->DockOverlay = overlay; d->DockOverlay = overlay;
#ifdef Q_OS_LINUX
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
#else
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint); setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
#endif
setWindowTitle("DockOverlayCross"); setWindowTitle("DockOverlayCross");
setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_TranslucentBackground);