From 0643bafd2ba72709ca8bf461f52f8174fe32fb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 28 Apr 2014 14:59:12 +0200 Subject: [PATCH] Use Client::sendClientMessage from Client::sendSyncRequest Less code duplication and port to XCB. REVIEW: 117768 --- client.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/client.cpp b/client.cpp index aced224a4b..13f8a80707 100644 --- a/client.cpp +++ b/client.cpp @@ -2234,20 +2234,9 @@ void Client::sendSyncRequest() } // Send the message to client - XEvent ev; - ev.xclient.type = ClientMessage; - ev.xclient.window = window(); - ev.xclient.format = 32; - ev.xclient.message_type = atoms->wm_protocols; - ev.xclient.data.l[0] = atoms->net_wm_sync_request; - ev.xclient.data.l[1] = xTime(); - ev.xclient.data.l[2] = syncRequest.value.lo; - ev.xclient.data.l[3] = syncRequest.value.hi; - ev.xclient.data.l[4] = 0; + sendClientMessage(window(), atoms->wm_protocols, atoms->net_wm_sync_request, syncRequest.value.lo, syncRequest.value.hi); syncRequest.isPending = true; syncRequest.lastTimestamp = xTime(); - XSendEvent(display(), window(), False, NoEventMask, &ev); - Xcb::sync(); } bool Client::wantsTabFocus() const