Opened 13 years ago

Closed 11 years ago

#284 closed enhancement (fixed)

BMenu needs diagonal mouse movement support (easy)

Reported by: darkwyrm Owned by: jackburton
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version:
Keywords: Cc: diver
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by wkornewald)

I don't know if this was left out on purpose, but BMenus need to support fast diagonal movement when moving from one menu to a submenu. What I mean is this:


|subitem 1 |< submenu 1 | |subitem 2 | superitem 2|

|subitem 3|

|subitem 4 | |subitem 5 | |subitem 6 |


The user should be able to navigate from over the 'submenu 1' item directly to 'subitem 3' without the submenu closing on him.

Attachments (3)

menu-diagonal-movement.patch (5.7 KB) - added by denis washington 11 years ago.
Patch for #284
menu-diagonal-movement2.patch (6.7 KB) - added by denis washington 11 years ago.
Updated patch (fixes crasher; select item in navigation area after timeout; item clicked in navigation area shortly selects the item for feedback)
menu-diagonal-movement3.patch (8.7 KB) - added by denis washington 11 years ago.
Second patch update (includes header changes; further fixes to timeout; open submenus after a 0.2 sec delay to make menu browsing smoother - moving a cursor quickly down a menu doesn't cause submenus to quickly appear and disappear while the cursor flies over an item with submenu)

Download all attachments as: .zip

Change History (24)

comment:1 Changed 13 years ago by darkwyrm

Owner: changed from bpmagic@… to jackburton

comment:2 Changed 13 years ago by jackburton

It wasn't left out on purpose, obviously. Menu tracking currently is very basic and not user friendly at all. Feel free to fix/extend it :)

comment:3 Changed 13 years ago by diver

Cc: diver added

comment:4 Changed 13 years ago by diver

It seems to be fixed now, isn't it?

comment:5 Changed 13 years ago by jackburton

Not really. It just got a bit better because menus wait some time before closing themselves, even if they should.

comment:6 Changed 12 years ago by wkornewald

Description: modified (diff)
Platform: All
Summary: BMenu needs diagonal mouse movement supportBMenu needs diagonal mouse movement support (easy)
Type: bugenhancement

comment:7 Changed 12 years ago by jackburton

Are you sure it's that easy ?

comment:8 Changed 12 years ago by wkornewald

I just thought it would mostly be an algorithm thing and could still be interesting for those who are experienced developers, but not yet familiar with our API. Feel free change this task.

comment:9 Changed 12 years ago by wkornewald

Component: - GeneralKits/Interface Kit

Changed 11 years ago by denis washington

Patch for #284

comment:10 Changed 11 years ago by jackburton

Nice work! I'll see if I can integrate it in the next days. Thank you!

comment:11 Changed 11 years ago by stippi

Nice work, Denis! I still like the mouse speed idea as well. Maybe both could be combined? Right now it looks like one can't select menu items in the same menu if you happen to have the mouse in the navigation area. I actually have to apply your patch, though, to see how it feels.

comment:12 Changed 11 years ago by stippi

Ok, I have applied the patch, and there is a definite improvement. However, there are a few "buts": 1) From time to time, I don't get the effects of the patch, I don't know what situations cause this. 2) There is the problem I saw coming - if you are within the navigation rect, you can move your mouse whichever way you want, it won't select the items under the mouse, only if you move the mouse out of the navigation rect. I would propose to combine the mouse speed and this patch and then it should be perfect. Finally 3) I observed a crash with this patch - can it be that _UpdateStateOpenSelect() might be called with a NULL item? The crash was in BMenuItem::Menu().

Changed 11 years ago by denis washington

Updated patch (fixes crasher; select item in navigation area after timeout; item clicked in navigation area shortly selects the item for feedback)

comment:13 Changed 11 years ago by jackburton

Did you forget to include the modified Menu.h and MenuBar.h by chance ?

comment:14 Changed 11 years ago by denis washington

Sorry that I haven't replied to your comments actively yet, I was a victim of the "Ticket must contain summary" problem...

@stippi: The last patch fixes 2) or 3). The third version I'll attach now may fix 1) too - I didn't experience that myself, but the code is sufficiently changed to act slightly different now.

@jackburton: Yes I forgot the header changes - the next patch update will include them.

Changed 11 years ago by denis washington

Second patch update (includes header changes; further fixes to timeout; open submenus after a 0.2 sec delay to make menu browsing smoother - moving a cursor quickly down a menu doesn't cause submenus to quickly appear and disappear while the cursor flies over an item with submenu)

comment:15 Changed 11 years ago by jackburton

I tried the patch and I have to say I like how it works. I'll try it still for some time to see if there are any issues associated with it, and then I'll commit it. Thank you for your great work!

comment:16 Changed 11 years ago by stippi

Ah! Very nice! When it does work, I think it works perfectly now. But it doesn't /always/ work for me. I have not figured out the reasons yet. I tested with the Deskbar navigation. More often than not, the Application submenu closes for me when I move the mouse diagonally towards it. But sometimes it works. I think it is less of a problem with the other submenus, maybe because they are not as tall? Anyways, nice work!

comment:17 Changed 11 years ago by jackburton

I've been using the patch since 26/02, and I never encountered the problem pointed out by stippi. Maybe I was just more lucky, though :) Can we apply the patch, since, even if it has this small issue, it's still a nice improvement over the current behaviour ? We can still improve it when it's in the tree, anyway.

comment:18 Changed 11 years ago by axeld

Sounds good to me, please do!

comment:19 Changed 11 years ago by jackburton

Any objections, Stephan ?

comment:20 Changed 11 years ago by stippi

None at all, please go ahead! The patch is great and improves things a lot!

comment:21 Changed 11 years ago by jackburton

Resolution: fixed
Status: newclosed

Applied in hrev24193.

Note: See TracTickets for help on using tickets.