NAME
XChangePointerDevice - change which device is the X pointer
SYNTAX
Status XChangePointerDevice(Display *_d_i_s_p_l_a_y, XDevice
*_d_e_v_i_c_e, int _x_a_x_i_s, int _y_a_x_i_s);
ARGUMENTS
-
display
-
Specifies the connection to the X server.
-
device
-
Specifies the device to be used as the X pointer.
-
xaxis
-
Specifies the axis of the device to be used as the X pointer x-axis.
-
yaxis
-
Specifies the axis of the device to be used as the X pointer y-axis.
DESCRIPTION
The _X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e request causes the server to use the specified
device as the X pointer. The device must have been opened by the client via
_X_O_p_e_n_D_e_v_i_c_e or a _B_a_d_D_e_v_i_c_e error will result. The device must
support input class _V_a_l_u_a_t_o_r_s or a _B_a_d_M_a_t_c_h error will result.
If the implementation does not support use of the specified device as the
X pointer, a _B_a_d_D_e_v_i_c_e error will result.
If the specified device is grabbed by another client, _A_l_r_e_a_d_y_G_r_a_b_b_e_d
is returned. If the specified device is frozen by a grab on another device,
_G_r_a_b_F_r_o_z_e_n is returned.
If the request is successful, _S_u_c_c_e_s_s is returned.
If the request succeeds,
a _C_h_a_n_g_e_D_e_v_i_c_e_N_o_t_i_f_y event is sent to all clients that have selected that
event. A _M_a_p_p_i_n_g_N_o_t_i_f_y event with request = _M_a_p_p_i_n_g_P_o_i_n_t_e_r is
sent to all clients.
The specified device becomes the X pointer, and
the old X pointer becomes accessible through the input extension
protocol requests.
_X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e can generate a _B_a_d_D_e_v_i_c_e or a _B_a_d_M_a_t_c_h
error.
DIAGNOSTICS
-
_B_a_d_D_e_v_i_c_e
-
An invalid device was specified. The specified device does not exist, has
not been opened by this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e, or is already
one of the core X input devices (pointer or keyboard). This error may also
occur if the server implementation does not support using the specified
device as the X pointer.
-
_B_a_d_M_a_t_c_h
-
This error may occur if an _X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e request was made
specifying a device that has less than two valuators, or specifying a
valuator index beyond the range supported by the device.
SEE ALSO
XChangeKeyboardDevice
_P_r_o_g_r_a_m_m_i_n_g _W_i_t_h _X_l_i_b