[mutter] Revert "wayland-pointer: Just use the pointer actor instead of doing a full repick"
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Revert "wayland-pointer: Just use the pointer actor instead of doing a full repick"
- Date: Wed, 8 Oct 2014 20:48:50 +0000 (UTC)
commit ead79f834c7eada35228d27b694d8050302981d6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Oct 8 13:43:57 2014 -0700
Revert "wayland-pointer: Just use the pointer actor instead of doing a full repick"
This reverts commit 33acb5fea07c83236f254456d11d34e2c7671719.
The issue here is that the pointer actor does not actually get reset
when the actor's reactivity changes, so we end up with stale picks after
actors are destroyed.
I have a local patch to Clutter for this, but I don't have time to
submit it upstream, so let's just use the ugly code for now.
src/wayland/meta-wayland-pointer.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 448d223..9f6c264 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -281,12 +281,25 @@ static void
repick_for_event (MetaWaylandPointer *pointer,
const ClutterEvent *for_event)
{
- ClutterActor *actor;
+ ClutterActor *actor = NULL;
if (for_event)
- actor = clutter_event_get_source (for_event);
+ {
+ actor = clutter_event_get_source (for_event);
+ }
else
- actor = clutter_input_device_get_pointer_actor (pointer->device);
+ {
+ ClutterStage *stage = clutter_input_device_get_pointer_stage (pointer->device);
+
+ if (stage)
+ {
+ ClutterPoint pos;
+
+ clutter_input_device_get_coords (pointer->device, NULL, &pos);
+ actor = clutter_stage_get_actor_at_pos (stage, CLUTTER_PICK_REACTIVE,
+ pos.x, pos.y);
+ }
+ }
if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
pointer->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]