protocol: remove absolute coordinates from pointer
This change depens on the Wayland core commit: "protocol: remove absolute coordinates from pointer". Remove the absolute coordinates from pointer motion and pointer_focus events. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
dfb93a9e71
commit
b29f412eb8
@@ -100,8 +100,7 @@ struct wl_shm_listener shm_listenter = {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
input_device_handle_motion(void *data, struct wl_input_device *input_device,
|
input_device_handle_motion(void *data, struct wl_input_device *input_device,
|
||||||
uint32_t time,
|
uint32_t time, int32_t sx, int32_t sy)
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +121,7 @@ static void
|
|||||||
input_device_handle_pointer_focus(void *data,
|
input_device_handle_pointer_focus(void *data,
|
||||||
struct wl_input_device *input_device,
|
struct wl_input_device *input_device,
|
||||||
uint32_t time, struct wl_surface *surface,
|
uint32_t time, struct wl_surface *surface,
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
int32_t sx, int32_t sy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -1474,8 +1474,7 @@ input_set_focus_widget(struct input *input, struct widget *focus,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
input_handle_motion(void *data, struct wl_input_device *input_device,
|
input_handle_motion(void *data, struct wl_input_device *input_device,
|
||||||
uint32_t time,
|
uint32_t time, int32_t sx, int32_t sy)
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
|
||||||
{
|
{
|
||||||
struct input *input = data;
|
struct input *input = data;
|
||||||
struct window *window = input->pointer_focus;
|
struct window *window = input->pointer_focus;
|
||||||
@@ -1598,7 +1597,7 @@ static void
|
|||||||
input_handle_pointer_focus(void *data,
|
input_handle_pointer_focus(void *data,
|
||||||
struct wl_input_device *input_device,
|
struct wl_input_device *input_device,
|
||||||
uint32_t time, struct wl_surface *surface,
|
uint32_t time, struct wl_surface *surface,
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
int32_t sx, int32_t sy)
|
||||||
{
|
{
|
||||||
struct input *input = data;
|
struct input *input = data;
|
||||||
struct window *window;
|
struct window *window;
|
||||||
|
|||||||
@@ -500,8 +500,7 @@ static const struct wl_output_listener output_listener = {
|
|||||||
/* parent input interface */
|
/* parent input interface */
|
||||||
static void
|
static void
|
||||||
input_handle_motion(void *data, struct wl_input_device *input_device,
|
input_handle_motion(void *data, struct wl_input_device *input_device,
|
||||||
uint32_t time,
|
uint32_t time, int32_t sx, int32_t sy)
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
|
||||||
{
|
{
|
||||||
struct wayland_input *input = data;
|
struct wayland_input *input = data;
|
||||||
struct wayland_compositor *c = input->compositor;
|
struct wayland_compositor *c = input->compositor;
|
||||||
@@ -535,7 +534,7 @@ static void
|
|||||||
input_handle_pointer_focus(void *data,
|
input_handle_pointer_focus(void *data,
|
||||||
struct wl_input_device *input_device,
|
struct wl_input_device *input_device,
|
||||||
uint32_t time, struct wl_surface *surface,
|
uint32_t time, struct wl_surface *surface,
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
int32_t sx, int32_t sy)
|
||||||
{
|
{
|
||||||
struct wayland_input *input = data;
|
struct wayland_input *input = data;
|
||||||
struct wayland_output *output;
|
struct wayland_output *output;
|
||||||
|
|||||||
+7
-12
@@ -208,8 +208,7 @@ weston_surface_move(struct weston_surface *es,
|
|||||||
|
|
||||||
wl_input_device_start_grab(&wd->input_device, &move->grab, time);
|
wl_input_device_start_grab(&wd->input_device, &move->grab, time);
|
||||||
|
|
||||||
wl_input_device_set_pointer_focus(&wd->input_device,
|
wl_input_device_set_pointer_focus(&wd->input_device, NULL, time, 0, 0);
|
||||||
NULL, time, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -317,8 +316,7 @@ weston_surface_resize(struct shell_surface *shsurf,
|
|||||||
|
|
||||||
wl_input_device_start_grab(&wd->input_device, &resize->grab, time);
|
wl_input_device_start_grab(&wd->input_device, &resize->grab, time);
|
||||||
|
|
||||||
wl_input_device_set_pointer_focus(&wd->input_device,
|
wl_input_device_set_pointer_focus(&wd->input_device, NULL, time, 0, 0);
|
||||||
NULL, time, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -522,27 +520,24 @@ popup_grab_focus(struct wl_grab *grab, uint32_t time,
|
|||||||
struct wl_client *client = priv->surface->surface.resource.client;
|
struct wl_client *client = priv->surface->surface.resource.client;
|
||||||
|
|
||||||
if (surface && surface->resource.client == client) {
|
if (surface && surface->resource.client == client) {
|
||||||
wl_input_device_set_pointer_focus(device, surface, time,
|
wl_input_device_set_pointer_focus(device, surface, time, x, y);
|
||||||
device->x, device->y, x, y);
|
|
||||||
grab->focus = surface;
|
grab->focus = surface;
|
||||||
} else {
|
} else {
|
||||||
wl_input_device_set_pointer_focus(device, NULL,
|
wl_input_device_set_pointer_focus(device, NULL, time, 0, 0);
|
||||||
time, 0, 0, 0, 0);
|
|
||||||
grab->focus = NULL;
|
grab->focus = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
popup_grab_motion(struct wl_grab *grab,
|
popup_grab_motion(struct wl_grab *grab,
|
||||||
uint32_t time, int32_t x, int32_t y)
|
uint32_t time, int32_t sx, int32_t sy)
|
||||||
{
|
{
|
||||||
struct wl_input_device *device = grab->input_device;
|
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
resource = grab->input_device->pointer_focus_resource;
|
resource = grab->input_device->pointer_focus_resource;
|
||||||
if (resource)
|
if (resource)
|
||||||
wl_resource_post_event(resource, WL_INPUT_DEVICE_MOTION,
|
wl_resource_post_event(resource, WL_INPUT_DEVICE_MOTION,
|
||||||
time, device->x, device->y, x, y);
|
time, sx, sy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1178,7 +1173,7 @@ rotate_binding(struct wl_input_device *device, uint32_t time,
|
|||||||
weston_matrix_init(&rotate->rotation);
|
weston_matrix_init(&rotate->rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_input_device_set_pointer_focus(device, NULL, time, 0, 0, 0, 0);
|
wl_input_device_set_pointer_focus(device, NULL, time, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user