From ad1ec8b57dde6f5cbb7a4f66272794a067dc3917 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Tue, 28 Oct 2014 16:10:57 +0400 Subject: xcb: Fix setting the alert state for a window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbwindow.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 0c2e9d047c..5d3206b097 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -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 -- cgit v1.2.3