summaryrefslogtreecommitdiff
path: root/unity-private/launcher
diff options
authorGord Allott <gord.allott@canonical.com>2010-09-16 15:42:41 +0100
committerGord Allott <gord.allott@canonical.com>2010-09-16 15:42:41 +0100
commita7291e86313b2fbf5abd732e5375bd9c8e4d109e (patch)
tree5ef0d0fe7b541192a48502d82d3aa5a8f3e28417 /unity-private/launcher
parentb3a888c4a62434ef24d06b86a2d8cc03dc7191a3 (diff)
sends motion event on animations
(bzr r505.4.3)
Diffstat (limited to 'unity-private/launcher')
-rw-r--r--unity-private/launcher/scroller-view.vala23
1 files changed, 23 insertions, 0 deletions
diff --git a/unity-private/launcher/scroller-view.vala b/unity-private/launcher/scroller-view.vala
index 942babf30..00de4464b 100644
--- a/unity-private/launcher/scroller-view.vala
+++ b/unity-private/launcher/scroller-view.vala
@@ -84,6 +84,9 @@ namespace Unity.Launcher
private float last_known_pointer_x = 0.0f;
private bool can_scroll = false;
+ private float last_known_x = 0;
+ private float last_known_y = 0;
+
/*
* scrolling variables
*/
@@ -264,6 +267,8 @@ namespace Unity.Launcher
float x, y;
event.get_coords (out x, out y);
+ last_known_x = x;
+ last_known_y = y;
if (assume_on_launcher)
x = 25;
@@ -325,6 +330,7 @@ namespace Unity.Launcher
{
get_stage ().motion_event.disconnect (on_motion_event);
}
+
Clutter.Actor picked_actor = handle_event (event, is_scrolling);
if (picked_actor is Clutter.Actor)
@@ -839,6 +845,15 @@ namespace Unity.Launcher
speed *= autoscroll_direction;
move_scroll_position (speed, true);
autoscroll_anim_active = is_autoscrolling;
+
+ Clutter.Event motion_event = { 0 };
+ motion_event.type = Clutter.EventType.LEAVE;
+ motion_event.motion.x = last_known_x;
+ motion_event.motion.y = last_known_y;
+ motion_event.motion.stage = get_stage () as Clutter.Stage;
+ motion_event.motion.flags = Clutter.EventFlags.FLAG_SYNTHETIC;
+ passthrough_motion_event (motion_event);
+
return is_autoscrolling;
});
}
@@ -1166,6 +1181,14 @@ namespace Unity.Launcher
else
cache.invalidate_texture_cache ();
+ Clutter.Event motion_event = { 0 };
+ motion_event.type = Clutter.EventType.LEAVE;
+ motion_event.motion.x = last_known_x;
+ motion_event.motion.y = last_known_y;
+ motion_event.motion.stage = get_stage () as Clutter.Stage;
+ motion_event.motion.flags = Clutter.EventFlags.FLAG_SYNTHETIC;
+ passthrough_motion_event (motion_event);
+
stored_delta = delta;
}