summaryrefslogtreecommitdiff
path: root/man/XIAllowEvents.txt
blob: f00b39b012b30e5dfae5f1ae56f0e88bc2692274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
XIALLOWEVENTS(libmansuffix)
===========================

NAME
----

   XIAllowEvents - Release queued events

SYNOPSIS
--------

    #include <X11/extensions/XInput2.h>

    Status XIAllowEvents( Display *display,
                          int deviceid,
                          int event_mode,
                          Time time );

    Status XIAllowTouchEvents( Display *dpy,
                               int deviceid,
                               unsigned int touchid,
                               Window grab_window,
                               int event_mode );

    display
            Specifies the connection to the X server.

    device
            Specifies the device that is to be grabbed or released

    event_mode
            Specifies whether a device is to be thawed and events are to be
            replayed, or how to handle a grabbed touch sequence.

    time
            A valid server time or CurrentTime.

    touchid
            The ID of the touch sequence to accept or reject. The value is ignored
            for event modes other than AcceptTouch and RejectTouch.

    grab_window
            The window on which to accept or reject a touch sequence grab. The value
            is ignored for event modes other than AcceptTouch and RejectTouch.

DESCRIPTION
-----------

    The XIAllowEvents request releases some queued events if the client
    has caused a device to freeze. It also is used to handle touch grab and
    ownership processing.

    The function has no effect if the specified time is earlier than the last-grab
    time of the most recent active grab for the client, or if the specified time is
    later than the current X server time. The time parameter must be CurrentTime for
    requests with event modes of XIAcceptTouch and XIRejectTouch.

    The following describes the processing that occurs depending on what constant
    you pass to the event_mode argument:

        XIAsyncDevice:
            If the specified device is frozen by the client, event processing for that
            device continues as usual. If the device is frozen multiple times by the
            client on behalf of multiple separate grabs, XIAsyncDevice thaws for
            all. XIAsyncDevice has no effect if the specified device is not frozen
            by the client, but the device need not be grabbed by the client.

        XISyncDevice:
            If the specified device is frozen and actively grabbed by the client,
            event processing for that device continues normally until the next
            button press or release, or key press or release, or a gesture begin or end
            event (depending on the grab) is reported to the client.
            At this time, the specified device again appears to freeze.
            However, if the reported event causes the grab to be released, the
            specified device does not freeze.
            XISyncDevice has no effect if the specified device is not frozen by the
            client or is not grabbed by the client.

        XIReplayDevice:
            If the specified device is actively grabbed by the client and is frozen
            as the result of an event having been sent to the client (either from
            the activation of a XIGrabButton or from a previous XIAllowEvents with
            mode SyncDevice, but not from a Grab), the grab is released and
            that event is completely reprocessed.  This time, however, the request
            ignores any passive grabs at or above (towards the root) the
            grab window of the grab just released.
            The request has no effect if the specified device is not grabbed by
            the client or if it is not frozen as the result of an event.
            In case of gesture begin event being replayed, the original grabbing
            client will receive a XI_GesturePinchEnd or XI_GestureSwipeEnd event.

        XIAsyncPairedDevice:
            If the paired master device is frozen by the client, event processing
            for it continues as usual. If the paired device is frozen multiple
            times by the client on behalf of multiple separate grabs,
            XIAsyncPairedDevice thaws for all.
            XIAsyncPairedDevice has no effect if the device is not frozen by the
            client, but those devices need not be grabbed by the client.
            XIAsyncPairedDevice has no effect if deviceid specifies a slave device.

        XISyncPair:
            If both the device and the paired master device are frozen by the
            client, event processing (for both devices) continues normally until
            the next XI_ButtonPress, XI_ButtonRelease, XI_KeyPress, or XI_KeyRelease
            event is reported to the client for a grabbed device (button event for
            a pointer, key event for a keyboard), at which time the devices again
            appear to freeze. However, if the reported event causes the grab to be
            released, then the devices do not freeze (but if the other device is
            still grabbed, then a subsequent event for it will still cause both
            devices to freeze).
            XISyncPair has no effect unless both the device and the paired master
            device are frozen by the client. If the device or paired master device
            is frozen twice by the client on behalf of two separate grabs,
            XISyncPair thaws for both (but a subsequent freeze for XISyncPair will
            only freeze each device once).
            XISyncPair has no effect if deviceid specifies a slave device.

        XIAsyncPair:
            If the device and the paired master device are frozen by the client,
            event processing for both devices continues normally. If a device is
            frozen twice by the client on behalf of two separate grabs, AsyncBoth
            thaws for both. XIAsyncPair has no effect unless both the device and the
            paired master device frozen by the client.
            XIAsyncPair has no effect if deviceid specifies a slave device.

        XIAcceptTouch:
            The client is deemed to have taken control of the touch sequence once it
            owns the sequence. TouchEnd events will be sent to all clients listening
            to the touch sequence that have either grabbed the touch sequence on a
            child window of the grab_window or have received events for the touch
            sequence through event selection. These clients will no longer receive
            any TouchUpdate events.

        XIRejectTouch:
            The client is no longer interested in the touch sequence, and will
            receive a XI_TouchEnd event. If the client is the current owner of the
            sequence, ownership will be passed on to the next listener.

DIAGNOSTICS
-----------

    BadDevice
            An invalid deviceid was specified.

    BadAccess
            This error may occur if event_mode is XIAcceptTouch and this client
            is not the current or potential owner of the specified touch ID.

    BadValue
            This error may occur if event_mode is XIAcceptTouch and touch ID is invalid.

    BadWindow
            A value for a grab_window argument does not name a defined
            Window.

SEE ALSO
--------

    XIGrabButton(libmansuffix)