Merge lp:~townsend/unity/fix-keynav-bfb-quicklist into lp:unity

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3958
Proposed branch: lp:~townsend/unity/fix-keynav-bfb-quicklist
Merge into: lp:unity
Diff against target: 61 lines (+12/-0)
4 files modified
launcher/Launcher.cpp (+5/-0)
launcher/Launcher.h (+1/-0)
launcher/LauncherController.cpp (+5/-0)
launcher/LauncherControllerPrivate.h (+1/-0)
To merge this branch: bzr merge lp:~townsend/unity/fix-keynav-bfb-quicklist
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+256188@code.launchpad.net

Commit message

Add new signal to tell the Launcher to terminate keynav mode and use that signal when a BFB quicklist item is chosen.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

See comments please

review: Needs Fixing
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

On a second thought, we might also get rid of UBus here (as being async, it might not always work as we'd love), and, if (IsInKeyNavMode()) emit a new launcher signal (key_nav_terminate_request) in Launcher::MouseDownLogic, that the LauncherController connects to...

What you think?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I'd stop the keynav only if the mouse event happens over an icon, not in the whole launcher (so we respect the same we were trying to do before)

Revision history for this message
Christopher Townsend (townsend) wrote :

Hey Marco,

Should be fixed now. I meant to move that inside the "if (launcher_icon)" block before pushing my last commit. Thanks for catching that:)

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/Launcher.cpp'
2--- launcher/Launcher.cpp 2015-03-30 15:48:13 +0000
3+++ launcher/Launcher.cpp 2015-04-16 12:19:16 +0000
4@@ -2364,6 +2364,11 @@
5
6 if (launcher_icon)
7 {
8+ if (IsInKeyNavMode())
9+ {
10+ key_nav_terminate_request.emit();
11+ }
12+
13 icon_mouse_down_ = launcher_icon;
14 // if MouseUp after the time ended -> it's an icon drag, otherwise, it's starting an app
15 auto cb_func = sigc::bind(sigc::mem_fun(this, &Launcher::StartIconDragTimeout), x, y);
16
17=== modified file 'launcher/Launcher.h'
18--- launcher/Launcher.h 2014-12-12 22:33:24 +0000
19+++ launcher/Launcher.h 2015-04-16 12:19:16 +0000
20@@ -144,6 +144,7 @@
21 sigc::signal<void> selection_change;
22 sigc::signal<void> hidden_changed;
23 sigc::signal<void> sc_launcher_icon_animation;
24+ sigc::signal<void> key_nav_terminate_request;
25
26 virtual bool InspectKeyEvent(unsigned int eventType,
27 unsigned int keysym,
28
29=== modified file 'launcher/LauncherController.cpp'
30--- launcher/LauncherController.cpp 2015-03-20 16:23:04 +0000
31+++ launcher/LauncherController.cpp 2015-04-16 12:19:16 +0000
32@@ -1289,6 +1289,10 @@
33 pimpl->keyboard_launcher_->key_down.connect(sigc::mem_fun(pimpl.get(), &Controller::Impl::ReceiveLauncherKeyPress));
34 pimpl->launcher_event_outside_connection_ =
35 pimpl->keyboard_launcher_->mouse_down_outside_pointer_grab_area.connect(sigc::mem_fun(pimpl.get(), &Controller::Impl::ReceiveMouseDownOutsideArea));
36+ pimpl->launcher_key_nav_terminate_ =
37+ pimpl->keyboard_launcher_->key_nav_terminate_request.connect([this] {
38+ KeyNavTerminate(false);
39+ });
40 }
41
42 void Controller::KeyNavActivate()
43@@ -1369,6 +1373,7 @@
44 pimpl->keyboard_launcher_->UnGrabKeyboard();
45 pimpl->launcher_key_press_connection_->disconnect();
46 pimpl->launcher_event_outside_connection_->disconnect();
47+ pimpl->launcher_key_nav_terminate_->disconnect();
48 pimpl->launcher_grabbed = false;
49 pimpl->ubus.SendMessage(UBUS_LAUNCHER_END_KEY_NAV,
50 glib::Variant(pimpl->keynav_restore_window_));
51
52=== modified file 'launcher/LauncherControllerPrivate.h'
53--- launcher/LauncherControllerPrivate.h 2014-02-27 05:30:25 +0000
54+++ launcher/LauncherControllerPrivate.h 2015-04-16 12:19:16 +0000
55@@ -149,6 +149,7 @@
56
57 connection::Wrapper launcher_key_press_connection_;
58 connection::Wrapper launcher_event_outside_connection_;
59+ connection::Wrapper launcher_key_nav_terminate_;
60 connection::Wrapper average_color_connection_;
61 };
62