mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
xwayland: add a size-safe wrapper for xcb_send_event
xcb_send_event expects the caller to always provide 32 byte data, even if the actual event struct is smaller than that. Reference: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/18
This commit is contained in:
parent
cc10a5259d
commit
c63275d75e
4 changed files with 35 additions and 8 deletions
|
|
@ -27,11 +27,12 @@ static void xwm_selection_send_notify(struct wlr_xwm *xwm,
|
|||
" requestor=%" PRIu32 " selection=%" PRIu32 " target=%" PRIu32 " property=%" PRIu32,
|
||||
req->requestor, req->time, req->requestor, req->selection, req->target,
|
||||
selection_notify.property);
|
||||
xcb_send_event(xwm->xcb_conn,
|
||||
xwm_send_event_with_size(xwm->xcb_conn,
|
||||
0, // propagate
|
||||
req->requestor,
|
||||
XCB_EVENT_MASK_NO_EVENT,
|
||||
(const char *)&selection_notify);
|
||||
&selection_notify,
|
||||
sizeof(selection_notify));
|
||||
xcb_flush(xwm->xcb_conn);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue