mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 04:08:13 +02:00
compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_event
The x11_backend_deliver_button_event can be called with any xcb_generic_event. The assert check if the call is done with the expected events. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
482ffdf006
commit
4ddc4cc4fa
1 changed files with 3 additions and 0 deletions
|
|
@ -1068,6 +1068,9 @@ x11_backend_deliver_button_event(struct x11_backend *b,
|
|||
struct x11_output *output;
|
||||
struct weston_pointer_axis_event weston_event;
|
||||
|
||||
assert(event->response_type == XCB_BUTTON_PRESS ||
|
||||
event->response_type == XCB_BUTTON_RELEASE);
|
||||
|
||||
output = x11_backend_find_output(b, button_event->event);
|
||||
if (!output)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue