Xnest: replace XGetPointerControl() by xcb_get_pointer_control()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
bc1d6fe9de
commit
cfcea4ef79
|
@ -76,10 +76,11 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff)
|
||||||
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
|
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
|
||||||
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
|
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
|
||||||
|
|
||||||
XGetPointerControl(xnestDisplay,
|
xnestGetPointerControl(xnestUpstreamInfo.conn,
|
||||||
&defaultPointerControl.num,
|
&defaultPointerControl.num,
|
||||||
&defaultPointerControl.den,
|
&defaultPointerControl.den,
|
||||||
&defaultPointerControl.threshold);
|
&defaultPointerControl.threshold);
|
||||||
|
|
||||||
InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels,
|
InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels,
|
||||||
xnestChangePointerControl,
|
xnestChangePointerControl,
|
||||||
GetMotionHistorySize(), 2, axes_labels);
|
GetMotionHistorySize(), 2, axes_labels);
|
||||||
|
|
|
@ -364,3 +364,31 @@ xcb_get_keyboard_mapping_reply_t *xnestGetKeyboardMapping(
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xnestGetPointerControl(
|
||||||
|
xcb_connection_t *conn,
|
||||||
|
int *acc_num,
|
||||||
|
int *acc_den,
|
||||||
|
int *threshold)
|
||||||
|
{
|
||||||
|
xcb_generic_error_t *err = NULL;
|
||||||
|
xcb_get_pointer_control_reply_t *reply = xcb_get_pointer_control_reply(
|
||||||
|
xnestUpstreamInfo.conn,
|
||||||
|
xcb_get_pointer_control(xnestUpstreamInfo.conn),
|
||||||
|
&err);
|
||||||
|
|
||||||
|
if (err) {
|
||||||
|
ErrorF("error retrieving pointer control data: %d\n", err->error_code);
|
||||||
|
free(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!reply) {
|
||||||
|
ErrorF("error retrieving pointer control data: no reply\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*acc_num = reply->acceleration_numerator;
|
||||||
|
*acc_den = reply->acceleration_denominator;
|
||||||
|
*threshold = reply->threshold;
|
||||||
|
free(reply);
|
||||||
|
}
|
||||||
|
|
|
@ -115,4 +115,6 @@ xcb_get_keyboard_mapping_reply_t *xnestGetKeyboardMapping(
|
||||||
int count
|
int count
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void xnestGetPointerControl(xcb_connection_t *conn, int *acc_num, int *acc_den, int *threshold);
|
||||||
|
|
||||||
#endif /* __XNEST__XCB_H */
|
#endif /* __XNEST__XCB_H */
|
||||||
|
|
Loading…
Reference in New Issue