Skip to content

Commit f378f68

Browse files
committed
meta-wayland-pointer.c: Get correct device coordinates from the
stage. The stage->pointer_devices table does not currently get populated (TODO) so pos.x and .y were never getting anything assigned to them. Fixes linuxmint/wayland#93, Fixes linuxmint/wayland#106 Fixes linuxmint/wayland#115, Fixes linuxmint/wayland#116 Maybe fixes? linuxmint/wayland#164 (works on 147.0.3) linuxmint/wayland#169
1 parent 5a4956e commit f378f68

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/wayland/meta-wayland-pointer.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
954954

955955
if (surface != NULL)
956956
{
957-
ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
958957
struct wl_client *client = wl_resource_get_client (surface->resource);
959958
graphene_point_t pos;
960959
MetaWindow *focus_window;
@@ -966,7 +965,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
966965
G_CALLBACK (focus_surface_destroyed),
967966
pointer);
968967

969-
clutter_stage_get_device_coords (stage, pointer->device, NULL, &pos);
968+
clutter_input_device_get_coords (pointer->device, NULL, &pos);
970969

971970
focus_window = meta_wayland_surface_get_window (pointer->focus_surface);
972971
if (focus_window)
@@ -1071,12 +1070,10 @@ meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
10711070
wl_fixed_t *sx,
10721071
wl_fixed_t *sy)
10731072
{
1074-
MetaBackend *backend = meta_get_backend ();
1075-
ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
10761073
float xf = 0.0f, yf = 0.0f;
10771074
graphene_point_t pos;
10781075

1079-
clutter_stage_get_device_coords (stage, pointer->device, NULL, &pos);
1076+
clutter_input_device_get_coords (pointer->device, NULL, &pos);
10801077
meta_wayland_surface_get_relative_coordinates (surface, pos.x, pos.y, &xf, &yf);
10811078

10821079
*sx = wl_fixed_from_double (xf);

0 commit comments

Comments
 (0)