Opened 14 years ago

Closed 12 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:
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 12 years ago.
Patch for #284
menu-diagonal-movement2.patch (6.7 KB ) - added by denis washington 12 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 12 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 by darkwyrm, 14 years ago

Owner: changed from bpmagic@… to jackburton

comment:2 by jackburton, 14 years ago

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 by diver, 14 years ago

Cc: diver added

comment:4 by diver, 14 years ago

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

comment:5 by jackburton, 14 years ago

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

comment:6 by wkornewald, 13 years ago

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

comment:7 by jackburton, 13 years ago

Are you sure it's that easy ?

comment:8 by wkornewald, 13 years ago

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 by wkornewald, 13 years ago

Component: - GeneralKits/Interface Kit

by denis washington, 12 years ago

Patch for #284

comment:10 by jackburton, 12 years ago

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

comment:11 by stippi, 12 years ago

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 by stippi, 12 years ago

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().

by denis washington, 12 years ago

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

comment:13 by jackburton, 12 years ago

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

comment:14 by denis washington, 12 years ago

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.

by denis washington, 12 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)

comment:15 by jackburton, 12 years ago

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 by stippi, 12 years ago

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 by jackburton, 12 years ago

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 by axeld, 12 years ago

Sounds good to me, please do!

comment:19 by jackburton, 12 years ago

Any objections, Stephan ?

comment:20 by stippi, 12 years ago

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

comment:21 by jackburton, 12 years ago

Resolution: fixed
Status: newclosed

Applied in hrev24193.

Note: See TracTickets for help on using tickets.