|
|
@ -72,7 +72,7 @@ static void send_pointer_position_event(struct wlr_x11_output *output,
|
|
|
|
static void send_touch_down_event(struct wlr_x11_output *output,
|
|
|
|
static void send_touch_down_event(struct wlr_x11_output *output,
|
|
|
|
int16_t x, int16_t y, int32_t touch_id, xcb_timestamp_t time) {
|
|
|
|
int16_t x, int16_t y, int32_t touch_id, xcb_timestamp_t time) {
|
|
|
|
struct wlr_event_touch_down ev = {
|
|
|
|
struct wlr_event_touch_down ev = {
|
|
|
|
.device = &output->touch_dev,
|
|
|
|
.device = &output->touch.base,
|
|
|
|
.time_msec = time,
|
|
|
|
.time_msec = time,
|
|
|
|
.x = (double)x / output->wlr_output.width,
|
|
|
|
.x = (double)x / output->wlr_output.width,
|
|
|
|
.y = (double)y / output->wlr_output.height,
|
|
|
|
.y = (double)y / output->wlr_output.height,
|
|
|
@ -85,7 +85,7 @@ static void send_touch_down_event(struct wlr_x11_output *output,
|
|
|
|
static void send_touch_motion_event(struct wlr_x11_output *output,
|
|
|
|
static void send_touch_motion_event(struct wlr_x11_output *output,
|
|
|
|
int16_t x, int16_t y, int32_t touch_id, xcb_timestamp_t time) {
|
|
|
|
int16_t x, int16_t y, int32_t touch_id, xcb_timestamp_t time) {
|
|
|
|
struct wlr_event_touch_motion ev = {
|
|
|
|
struct wlr_event_touch_motion ev = {
|
|
|
|
.device = &output->touch_dev,
|
|
|
|
.device = &output->touch.base,
|
|
|
|
.time_msec = time,
|
|
|
|
.time_msec = time,
|
|
|
|
.x = (double)x / output->wlr_output.width,
|
|
|
|
.x = (double)x / output->wlr_output.width,
|
|
|
|
.y = (double)y / output->wlr_output.height,
|
|
|
|
.y = (double)y / output->wlr_output.height,
|
|
|
@ -98,7 +98,7 @@ static void send_touch_motion_event(struct wlr_x11_output *output,
|
|
|
|
static void send_touch_up_event(struct wlr_x11_output *output,
|
|
|
|
static void send_touch_up_event(struct wlr_x11_output *output,
|
|
|
|
int32_t touch_id, xcb_timestamp_t time) {
|
|
|
|
int32_t touch_id, xcb_timestamp_t time) {
|
|
|
|
struct wlr_event_touch_up ev = {
|
|
|
|
struct wlr_event_touch_up ev = {
|
|
|
|
.device = &output->touch_dev,
|
|
|
|
.device = &output->touch.base,
|
|
|
|
.time_msec = time,
|
|
|
|
.time_msec = time,
|
|
|
|
.touch_id = touch_id,
|
|
|
|
.touch_id = touch_id,
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -341,6 +341,8 @@ bool wlr_input_device_is_x11(struct wlr_input_device *wlr_dev) {
|
|
|
|
return wlr_dev->keyboard->impl == &keyboard_impl;
|
|
|
|
return wlr_dev->keyboard->impl == &keyboard_impl;
|
|
|
|
case WLR_INPUT_DEVICE_POINTER:
|
|
|
|
case WLR_INPUT_DEVICE_POINTER:
|
|
|
|
return wlr_dev->pointer->impl == &pointer_impl;
|
|
|
|
return wlr_dev->pointer->impl == &pointer_impl;
|
|
|
|
|
|
|
|
case WLR_INPUT_DEVICE_TOUCH:
|
|
|
|
|
|
|
|
return wlr_dev->touch->impl == &touch_impl;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return wlr_dev->impl == &input_device_impl;
|
|
|
|
return wlr_dev->impl == &input_device_impl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|