From 41705529d9995291324e1d06d45861ce63b1c72e Mon Sep 17 00:00:00 2001 From: Mikhail Svetkin Date: Thu, 21 Jun 2018 11:48:50 +0200 Subject: xcb: Refactor align of xcb events Use C++11 alignas instead of a union to pad the xcb_*_event. It allows using the struct directly without accessing a union member. Change-Id: I221a6708ef7af844bd6b71a57dcbab75e1319c72 Reviewed-by: Jesus Fernandez --- src/plugins/platforms/xcb/qxcbclipboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbclipboard.cpp') diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index 70a413ebe1..263ef5fb1f 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -581,7 +581,7 @@ void QXcbClipboard::handleSelectionRequest(xcb_selection_request_event_t *req) return; } - Q_DECLARE_XCB_EVENT(event, xcb_selection_notify_event_t); + q_padded_xcb_event event = {}; event.response_type = XCB_SELECTION_NOTIFY; event.requestor = req->requestor; event.selection = req->selection; -- cgit v1.2.3