Problem with Menu in HW 6.1

Report any Hollywood bugs here
marko
Posts: 56
Joined: Wed Dec 15, 2010 5:19 pm
Contact:

Problem with Menu in HW 6.1

Post by marko »

Hi,

I can't get the menu strip to work now when compiling with HW 6.1 on OS4, it seemed to work with 6.0...
@MENU id , table
Can anybody confirm, or is it just me?

:)
AmigaOS 4.1 on Sam440ep-flex@800MHz
http://www.m4rko.com/amiga
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with Menu in HW 6.1

Post by airsoftsoftwair »

Does the MenuDemo example work?
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

Re: Problem with Menu in HW 6.1

Post by PEB »

For me it works (OS4 FE), but not anywhere on the screen---only at the top of the screen. (So it seems to ignore PopupMenu preferences.)
This is different than it used to be; and it is different than most other programs.
marko
Posts: 56
Joined: Wed Dec 15, 2010 5:19 pm
Contact:

Re: Problem with Menu in HW 6.1

Post by marko »

Does the MenuDemo example work?
Nope, nothing happens. (running WB with just AmiDock and HW GUI, no 3rd-party progs)

EDIT: Oh, wait. The menu appears _only_ if I right click the Workbench title bar (not if right click first and then take the mouse pointer to the WB title bar, and no PopupMenu). The behavioral is different than in HW 6.0 and other programs.
AmigaOS 4.1 on Sam440ep-flex@800MHz
http://www.m4rko.com/amiga
marko
Posts: 56
Joined: Wed Dec 15, 2010 5:19 pm
Contact:

Re: Problem with Menu in HW 6.1

Post by marko »

only at the top of the screen.
Seems same as here.
AmigaOS 4.1 on Sam440ep-flex@800MHz
http://www.m4rko.com/amiga
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with Menu in HW 6.1

Post by airsoftsoftwair »

The change in behaviour is caused by the following fix:

Code: Select all

- Fix [Amiga]: Listening to the right mouse button didn't work when a display used a menu bar
In Hollywood 6.0 you couldn't use a menu bar *and* listen to the right mouse button at the same time. In Hollywood 6.1 this is possible now but the downside is that you can only access the menu bar from the Workbench title bar. This is a system limitation. The only way to allow both would be to add a new flag to @DISPLAY which allows you to choose the mode you want but this is not so nice.
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

Re: Problem with Menu in HW 6.1

Post by PEB »

Could a function be made to display the menu strip when called---maybe DisplayMenuStrip()? That way the function could be called, if desired, whenever the right mouse button is pressed; or a different key/event could also trigger it.
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Problem with Menu in HW 6.1

Post by jPV »

I noticed this on MorphOS too. You can have system settings configured so that menus would appear under mouse pointer instead of just from the screen title bar, but that doesn't work with Hollywood programs and it makes them behave in a non-standard way.

I think the best would be that if you don't track any right mouse button events, then system menus would work, but listening RMB would override them.

Or if RMB menus would at least work when you have window borders and click over them... if RMB listening would only work on the actual drawing area.... I guess even that would help little.
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with Menu in HW 6.1

Post by airsoftsoftwair »

PEB's suggestion is not possible because there's no way to initiate the system's menu modal loop programmatically. jPV's suggestion is possible but it isn't an optimal solution either. Of course I could check if there is an event handler on one of the right mouse button event types and then disable menu opening via RMB on the Hollywood display but what about IsRightMouse()? This is a call used for polling the right mouse button's state so it's impossible to disable menu opening via RMB in that case.

The only solution to this that I see is to use a new flag for @DISPLAY that allows you to set whether you want to have RMB events at the expense of being unable to listen to the RMB or if you don't want to have RMB events in order to allow the menu bar to be opened by right clicking over the display as well...
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Problem with Menu in HW 6.1

Post by jPV »

airsoftsoftwair wrote:The only solution to this that I see is to use a new flag for @DISPLAY that allows you to set whether you want to have RMB events at the expense of being unable to listen to the RMB or if you don't want to have RMB events in order to allow the menu bar to be opened by right clicking over the display as well...
I would like to see this option, because I don't see such a need for custom RMB functionality usually. At least I'm going to use more system menus than custom RMB functions in my programs.
Post Reply