Xcb: propagate stays-on-top or -below hints from window flags
Before, you had to first hide a window, then set the flags, then show it again as the flags were only applied when showing the window. This is unintuitive. Task-number: QTBUG-49628 Change-Id: I240e633ac2581c0ff0e4f35dead1b79e15e15350 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
1e761c80cf
commit
5645dc9f8a
@ -1098,6 +1098,7 @@ void QXcbWindow::setWindowFlags(Qt::WindowFlags flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
setWmWindowType(wmWindowTypes, flags);
|
setWmWindowType(wmWindowTypes, flags);
|
||||||
|
setNetWmStateWindowFlags(flags);
|
||||||
setMotifWindowFlags(flags);
|
setMotifWindowFlags(flags);
|
||||||
|
|
||||||
setTransparentForMouseEvents(flags & Qt::WindowTransparentForInput);
|
setTransparentForMouseEvents(flags & Qt::WindowTransparentForInput);
|
||||||
@ -1333,6 +1334,15 @@ void QXcbWindow::updateNetWmStateBeforeMap()
|
|||||||
setNetWmStates(states);
|
setNetWmStates(states);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QXcbWindow::setNetWmStateWindowFlags(Qt::WindowFlags flags)
|
||||||
|
{
|
||||||
|
changeNetWmState(flags & Qt::WindowStaysOnTopHint,
|
||||||
|
atom(QXcbAtom::_NET_WM_STATE_ABOVE),
|
||||||
|
atom(QXcbAtom::_NET_WM_STATE_STAYS_ON_TOP));
|
||||||
|
changeNetWmState(flags & Qt::WindowStaysOnBottomHint,
|
||||||
|
atom(QXcbAtom::_NET_WM_STATE_BELOW));
|
||||||
|
}
|
||||||
|
|
||||||
void QXcbWindow::updateNetWmUserTime(xcb_timestamp_t timestamp)
|
void QXcbWindow::updateNetWmUserTime(xcb_timestamp_t timestamp)
|
||||||
{
|
{
|
||||||
xcb_window_t wid = m_window;
|
xcb_window_t wid = m_window;
|
||||||
|
@ -184,6 +184,7 @@ protected:
|
|||||||
void setNetWmStates(NetWmStates);
|
void setNetWmStates(NetWmStates);
|
||||||
|
|
||||||
void setMotifWindowFlags(Qt::WindowFlags flags);
|
void setMotifWindowFlags(Qt::WindowFlags flags);
|
||||||
|
void setNetWmStateWindowFlags(Qt::WindowFlags flags);
|
||||||
|
|
||||||
void updateMotifWmHintsBeforeMap();
|
void updateMotifWmHintsBeforeMap();
|
||||||
void updateNetWmStateBeforeMap();
|
void updateNetWmStateBeforeMap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user