xcb: Fix setting the alert state for a window

Send a _NET_WM_STATE client message to the root window
instead of changing the window property.

Task-number: QTBUG-41310
Change-Id: I864af0158ec55796bb3cbc123469709b2be54ec8
Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Alexander Volkov 2014-10-28 16:10:57 +04:00 committed by Shawn Rutledge
parent 3203601315
commit ad1ec8b57d

View File

@ -2380,13 +2380,10 @@ void QXcbWindow::setAlertState(bool enabled)
{
if (m_alertState == enabled)
return;
const NetWmStates oldState = netWmStates();
m_alertState = enabled;
if (enabled) {
setNetWmStates(oldState | NetWmStateDemandsAttention);
} else {
setNetWmStates(oldState & ~NetWmStateDemandsAttention);
}
changeNetWmState(enabled, atom(QXcbAtom::_NET_WM_STATE_DEMANDS_ATTENTION));
}
bool QXcbWindow::needsSync() const