← Back to team overview

unity-dev team mailing list archive

[Ayatana-dev] Mentorship, Signal Propagation in Unity

 

Hello, I'm working on bug 688830 in Unity, which is about letting the user select a quicklist item with just one right click. Currently, you have to let go of the mouse button first or you will just start dragging the launcher icon. This behavior is annoying and the bug is tagged as bite-size so I decided to try to help fix it.

Dieder Roche commented it could be "bitesize with good mentorship," so I hope I can get a little assistance here in figuring out Unity's technical design. Okay, maybe more than the design. :) There's a lot to take in.

I see that when there is an OnMouseDown signal emitted, a Launcher instance will handle it, and I can see where later in the chain of method calls, the quicklist menu item is created and shown in LauncherIcon::RecvMouseDown. What I haven't found yet is what sends the OnMouseDown signal in the first place.

For example, in Launcher.cpp line 186,

OnMouseDown.connect  (sigc::mem_fun (this, &Launcher::RecvMouseDown)); 

What is OnMouseDown and where is it instantiated? Does it happen outside of Unity or am I just overlooking the place where it is created?

I think if I could see a higher level source of input events (or do I mean lower?) , if would be easier to see what to do with them further down the line.

Also, if it sounds like I'm approaching the whole problem the wrong way, feel free to point me in a new direction.

Thanks,
Josh

https://bugs.launchpad.net/unity/+bug/688830

Follow ups