DESCRIPTION
The
_X_S_e_n_d_E_x_t_e_n_s_i_o_n_E_v_e_n_t
request identifies the destination window,
determines which clients should receive the specified events,
and ignores any active grabs.
This request requires you to pass an event class list.
For a discussion of the valid event class names,
see _X_O_p_e_n_D_e_v_i_c_e_(_3_X_1_1_).
This request uses the w argument to identify the destination window as follows:
-
·
If w is
-
_P_o_i_n_t_e_r_W_i_n_d_o_w ,
the destination window is the window that contains the pointer.
-
·
If w is
-
_I_n_p_u_t_F_o_c_u_s
and if the focus window contains the pointer,
the destination window is the window that contains the pointer;
otherwise, the destination window is the focus window.
To determine which clients should receive the specified events,
_X_S_e_n_d_E_x_t_e_n_s_i_o_n_E_v_e_n_t
uses the propagate argument as follows:
-
·
If event_list is the empty set,
-
the event is sent to the client that created the destination window.
If that client no longer exists,
no event is sent.
-
·
If propagate is
-
_F_a_l_s_e,
the event is sent to every client selecting on destination any of the event
types specified by the event_list array.
-
·
If propagate is
-
_T_r_u_e
and no clients have selected on destination any of
the events specified by the event_list array,
the destination is replaced with the
closest ancestor of destination for which some client has selected a
type specified by the event-list array and for which no intervening
window has that type in its
do-not-propagate-mask.
If no such window exists or if the window is
an ancestor of the focus window and
_I_n_p_u_t_F_o_c_u_s
was originally specified
as the destination, the event is not sent to any clients.
Otherwise, the event is reported to every client selecting on the final
destination any of the events specified in the event_list array.
The event in the
_X_E_v_e_n_t
structure must be one of the events defined by the input extension (or a
_B_a_d_V_a_l_u_e
error results) so that the X server can correctly byte-swap
the contents as necessary.
The contents of the event are
otherwise unaltered and unchecked by the X server except to force send_event to
_T_r_u_e
in the forwarded event and to set the serial number in the event correctly.
_X_S_e_n_d_E_x_t_e_n_s_i_o_n_E_v_e_n_t
returns zero if the conversion to wire protocol format failed
and returns nonzero otherwise.
_X_S_e_n_d_E_x_t_e_n_s_i_o_n_E_v_e_n_t
can generate
_B_a_d_C_l_a_s_s,
_B_a_d_D_e_v_i_c_e,
_B_a_d_V_a_l_u_e,
and
_B_a_d_W_i_n_d_o_w
errors.
DIAGNOSTICS
-
_B_a_d_D_e_v_i_c_e
-
An invalid device was specified. The specified device does not exist or has
not been opened by this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e. This error may
also occur if the specified device is the X keyboard or X pointer device.
-
_B_a_d_V_a_l_u_e
-
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified for an argument, the full range defined
by the argument's type is accepted. Any argument defined as a set of
alternatives can generate this error.
-
_B_a_d_W_i_n_d_o_w
-
A value for a Window argument does not name a defined Window.
SEE ALSO
_P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b