~ubuntu-branches/ubuntu/trusty/libxi/trusty-security

« back to all changes in this revision

Viewing changes to src/XSndExEv.c

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-01-18 11:44:39 UTC
  • mfrom: (1.1.8) (4.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20120118114439-bm7qksg514zh51do
Tags: 2:1.5.99.2-0ubuntu3
Bump build depends on x11proto-input-dev to 2.1.99.5.  Our 2.1.99.4 package
is really 2.0.2, so 2.1.99.5 is the first version with MT support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 * XSendExtensionEvent - send an extension event to a client.
50
50
 *
51
51
 */
 
52
#ifdef HAVE_CONFIG_H
 
53
#include <config.h>
 
54
#endif
52
55
 
53
56
#include <X11/extensions/XI.h>
54
57
#include <X11/extensions/XIproto.h>
57
60
#include <X11/extensions/extutil.h>
58
61
#include "XIint.h"
59
62
 
 
63
/* Xlib's wire_vec is defined for a single event only, libXi may return
 
64
 * multiple events.
 
65
 */
 
66
typedef Status (*ext_event_to_wire)(Display*, XEvent*, xEvent**, int*);
 
67
 
60
68
Status
61
69
XSendExtensionEvent(
62
70
    register Display    *dpy,
71
79
    int ev_size;
72
80
    xSendExtensionEventReq *req;
73
81
    xEvent *ev;
74
 
    register Status(**fp) (Display *, XEvent*, xEvent **, int *);
 
82
    ext_event_to_wire *fp;
75
83
    Status status;
76
84
    XExtDisplayInfo *info = XInput_find_display(dpy);
77
85
 
81
89
 
82
90
    /* call through display to find proper conversion routine */
83
91
 
84
 
    fp = &dpy->wire_vec[event->type & 0177];
 
92
    fp = (ext_event_to_wire*)&dpy->wire_vec[event->type & 0177];
85
93
    if (*fp == NULL)
86
94
        *fp = _XiEventToWire;
87
 
    status = (**fp) (dpy, event, &ev, &num_events);
 
95
    status = (*fp) (dpy, event, &ev, &num_events);
88
96
 
89
97
    if (status) {
90
98
        GetReq(SendExtensionEvent, req);