FLTK logo

Re: [fltk.general] Making a menu_bar submenu close when the menu_barloses focus

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Making a menu_bar submenu close when the menu_barloses focus "'pvr... Sep 16, 2020  
 

On Tuesday, September 15, 2020 at 4:36:58 PM UTC+1 Greg Ercolano wrote:
On 2020-09-15 08:29, 'Philip Rose' via fltk.general wrote:
> Thanks Greg, I catch the “X to close” event normally.
> I am not seeing it as the menu item has the focus. So I don’t think this will help.

Hmm, does the menu stay up when you click outside of it?
That certainly would be bad, otherwise you can't get rid of the menu.

Perhaps the first click is lost to unpost the menu, but a follow up click
should close it.

With firefox on linux, if I have a menu open and glide away from it, hover
over a button and click, the menu unposts, but the button under the mouse
doesn't 'see' the click until I click again.


Thanks Greg and Ian

It's actually quite strange behaviour, which I also see in the menubar demo. If I remain within the main window, then it behaves as you describe. However if I move the mouse out of the main window and try and click the "X" nothing happens. I can click other widgets within the window, but not the widgets in the title-bar (minimise, maximise and close). They do however get highlighted when I pass the mouse over them but do not respond to a click.

With some other apps I've tried (Firefox and Visual Studio), the menu closes as soon as the mouse leaves the main window area, and the title-bar buttons are available for clicking. With another app that I know is Qt-based (WSJT-X), the menu does not close when the mouse leaves the main window but the title-bar widgets respond to the first click by closing the menu and the second click by doing what they should. Curiouser and curiouser, it seems that in two apps I know are FLTK-based (fldigi and flrig) the title bar widgets do respond to clicks after the mouse leaves the main window.

Thanks Phil.


--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/85c96e97-fc52-460d-8292-4e884ddc3e9an%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.