diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-05 09:30:21 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-19 13:02:12 +1000 |
commit | 4a694b3f4f5c92d62526ea1c5461c59df86c13db (patch) | |
tree | 59d47983f22336d70e55817c60e084990d296b75 /src/XSndExEv.c | |
parent | fd680f025b1db22b1069aed2f142f670181574e5 (diff) |
Silence compiler warning due to differnent event conversion procs
XExtInt.c:161:5: warning: initialization from incompatible pointer type
XSndExEv.c: In function 'XSendExtensionEvent':
XSndExEv.c:84:8: warning: assignment from incompatible pointer type
Xlib and libXi differ in the conversion functions. libXi takes an xEvent**
and a num_events parameter since it may split an event into multiple
xEvents.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/XSndExEv.c')
-rw-r--r-- | src/XSndExEv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/XSndExEv.c b/src/XSndExEv.c index ebaab33..e21f8f7 100644 --- a/src/XSndExEv.c +++ b/src/XSndExEv.c @@ -57,6 +57,11 @@ SOFTWARE. #include <X11/extensions/extutil.h> #include "XIint.h" +/* Xlib's wire_vec is defined for a single event only, libXi may return + * multiple events. + */ +typedef Status (*ext_event_to_wire)(Display*, XEvent*, xEvent**, int*); + Status XSendExtensionEvent( register Display *dpy, @@ -71,7 +76,7 @@ XSendExtensionEvent( int ev_size; xSendExtensionEventReq *req; xEvent *ev; - register Status(**fp) (Display *, XEvent*, xEvent **, int *); + ext_event_to_wire *fp; Status status; XExtDisplayInfo *info = XInput_find_display(dpy); @@ -81,10 +86,10 @@ XSendExtensionEvent( /* call through display to find proper conversion routine */ - fp = &dpy->wire_vec[event->type & 0177]; + fp = (ext_event_to_wire*)&dpy->wire_vec[event->type & 0177]; if (*fp == NULL) *fp = _XiEventToWire; - status = (**fp) (dpy, event, &ev, &num_events); + status = (*fp) (dpy, event, &ev, &num_events); if (status) { GetReq(SendExtensionEvent, req); |