Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#7022 closed bug (fixed)

Make popup menus more consistent

Reported by: dancxjo Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: popup menu Cc: mdisreali@…, pete.goodeve@…
Blocked By: Blocking:
Platform: All

Description

In BeOS, popup menus close upon releasing the mouse button that summoned them (without selecting any items unless the pointer is moved) UNLESS they have to be moved to avoid overflowing the screen -- in which case they stay open despite the release of the mouse button. Haiku has the same behavior (by default) except that releases without moving the mouse can inadvertently select items.

This patch alters some default values to make the behavior to stay open after releasing the button UNLESS the pointer is moved, in which case, it selects the menu item under the pointer. Developers can still override this behavior if desired.

Many programs, including Tracker, already take steps to avoid this glitch. This patch seems not to interfere with those measures. (However, FORCING the behavior [i.e. turning on openAnyway in all cases] causes some of those measures not to work, as in the case of ProcessController.)

Attachments (1)

popupmenu.diff (637 bytes ) - added by dancxjo 14 years ago.

Download all attachments as: .zip

Change History (6)

by dancxjo, 14 years ago

Attachment: popupmenu.diff added

comment:1 by dancxjo, 14 years ago

patch: 01

comment:2 by Disreali, 14 years ago

Cc: mdisreali@… added
Version: R1/alpha2R1/Development

There were several versions of the patch posted on the maillist discussion. Which version is attached to the ticket?

comment:3 by dancxjo, 14 years ago

This is the latest patch.

comment:4 by leavengood, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev40142, partially based on this patch. The addition was to just force openAnyway to true no matter what. Also filling in the clickToOpenRect if it was not provided. So unless a totally wrong clickToOpenRect is provided (doubtful since most apps providing it want to keep the menu open) this should finally fix the disappearing and accidental item selection pop-up issue.

comment:5 by Pete, 14 years ago

Cc: pete.goodeve@… added

I'm afraid this patch doesn't really work for me. I typically use a menu (top-left) point slightly displaced from the mouse-down point (which avoids the random highlighting of an item that occurs otherwise). This means that if the cursor does happen to be over the menu on a click (at the edge of the screen, for instance) the (forced) clickToOpenRect is not at the cursor, and I get a selection! And I resent the alwaysOpenAnyway forcing me to make a second click to close the menu if there's no selection.

Please see #7165 for (IMO) a better patch that works for all situations.

Note: See TracTickets for help on using tickets.