mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05: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
|
|
@ -49,11 +49,12 @@ static void xwm_dnd_send_event(struct wlr_xwm *xwm, xcb_atom_t type,
|
|||
.data = *data,
|
||||
};
|
||||
|
||||
xcb_send_event(xwm->xcb_conn,
|
||||
xwm_send_event_with_size(xwm->xcb_conn,
|
||||
0, // propagate
|
||||
dest->window_id,
|
||||
XCB_EVENT_MASK_NO_EVENT,
|
||||
(const char *)&event);
|
||||
&event,
|
||||
sizeof(event));
|
||||
xcb_flush(xwm->xcb_conn);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue