diff options
| author | Gordon Allott <gord.allott@canonical.com> | 2010-07-23 14:25:55 +0100 |
|---|---|---|
| committer | Gordon Allott <gord.allott@canonical.com> | 2010-07-23 14:25:55 +0100 |
| commit | 6680836648a690688281bd5022f0d3c7bb5e862f (patch) | |
| tree | cfec68e9d4a72606ce80547944bbbdab14240d99 | |
| parent | 2e8c6a449fab6a144bbd3dfd6b2d7d3e02f21691 (diff) | |
| parent | 5f3647818dbc6b35da00476872fdc233084d6db4 (diff) | |
fixes the issue with launcher focus
(bzr r403)
| -rw-r--r-- | unity-private/launcher/scroller-view.vala | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/unity-private/launcher/scroller-view.vala b/unity-private/launcher/scroller-view.vala index 45500958a..824750471 100644 --- a/unity-private/launcher/scroller-view.vala +++ b/unity-private/launcher/scroller-view.vala @@ -131,7 +131,10 @@ namespace Unity.Launcher button_release_event.connect (on_button_release_event); motion_event.connect (on_motion_event); enter_event.connect (on_enter_event); - leave_event.connect (on_leave_event); + + parent_set.connect (() => { + get_stage ().motion_event.connect (on_stage_motion); + }); // set a timeline for our fling animation fling_timeline = new Clutter.Timeline (1000); @@ -367,8 +370,6 @@ namespace Unity.Launcher if (view_type == ScrollerViewType.EXPANDED) return false; view_type = ScrollerViewType.EXPANDED; - Unity.global_shell.add_fullscreen_request (this); - // we need to set a new scroll position // get the index of the icon we are hovering over if (get_total_children_height () > get_available_height ()) @@ -401,15 +402,15 @@ namespace Unity.Launcher return false; } - private bool on_leave_event (Clutter.Event event) + private bool on_stage_motion (Clutter.Event event) { if (view_type == ScrollerViewType.CONTRACTED) return false; - if (event.crossing.x < get_width ()-1) return false; - - Unity.global_shell.remove_fullscreen_request (this); - - // need to store the focused item - focused_launcher = get_model_index_at_y_pos (event.crossing.y); + if (event.crossing.x < get_width ()) return false; + foreach (ScrollerChild child in model) + { + if (child.active) + focused_launcher = model.index_of (child); + } view_type = ScrollerViewType.CONTRACTED; order_children (false); |
