File xembedsniproxy-fix-using-XTest.patch of Package plasma5-workspace
From 7df184afa19f148c1cd09ae9588645bb2b4556fc Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wbauer@tmo.at>
Date: Wed, 31 May 2017 13:36:59 +0200
Subject: [xembedsniproxy] Fix check whether to use XTest
Because of C++'s operator precedence, '!' logically negated
all_event_masks only instead of the whole expression.
This resulted in the condition always being false and XTest never being
used.
Adding a pair of brackets fixes it.
BUG: 362941
BUG: 375017
FIXED-IN: 5.10.1
Differential Revision: https://phabricator.kde.org/D6048
---
xembed-sni-proxy/sniproxy.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp
index ff93ed4..5974baf 100644
--- a/xembed-sni-proxy/sniproxy.cpp
+++ b/xembed-sni-proxy/sniproxy.cpp
@@ -209,7 +209,7 @@ SNIProxy::SNIProxy(xcb_window_t wid, QObject* parent):
//if the client does supports that we send directly, otherwise we'll use xtest
auto waCookie = xcb_get_window_attributes(c, wid);
auto windowAttributes = xcb_get_window_attributes_reply(c, waCookie, nullptr);
- if (! windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS) {
+ if (! (windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS)) {
m_injectMode = XTest;
}
--
cgit v0.11.2