On 28.09.2011, at 07:27, Herman wrote:

> OK, success at last. Or at least partial success.
> 
> I have modified my test code to include your suggestions, thanks a lot!
> 
> But as usual when one problem is solved n others popup (no pun intended).

> There are some odd things I have noticed, though:
> 
> 1) FL_ENTER is transmitted to the children but curiously not FL_LEAVE.

OK, First of all, I assume that all the things you observe here are not true 
for the regular FLTK pulldown menus? i.e. does clicking on the decoration of 
the main menu correctly dismiss the popup?

The Menu stuff is filled with workarounds to make it resemble the original 
Forms behavior as much as possible. I would love to provide a popup window that 
behaves as you need it, but especially the missing PUSH event makes Fl_Button 
implementations somewhat useless in the popup window, assuming you need the 
click-popup-drag-release functionality. Click-popup-release-click-release 
should always work.

> The only way to make sure that they are highlighted appropriately while
> hovering is to use a loop: for all children: child(i)->handle(FL_LEAVE)
> in the popup window handle before sending the actual event to the
> children. While this is a work-around it does not seem to be a
> particularly pretty one.

> 2) Tooltips are only shown from the menu-button not from the
> Fl_Active_Button inside the popup. Oddly enough, the tooltips are not
> shown with 1.3.x but the text of the menu-button tooltip is shown for
> the Fl_Active_Buttons in 1.1.9 (maybe because of grab?).
> 3) FL_PUSH does not get routed to buttons

All the above are likely due to a missing fake FL_RELEASE which should be sent 
to the original menu button, followed by another fake FL_PUSH into the just 
popped up window. I doubt that I have time today, but maybe I can write that 
code on the weekend.

> 4) Even though the popup window is modal I seem to be able to move the
> main window while the popup window is shown! That looks rather odd and
> is not a desired behavior, I'm sure.

Yes, this is a huge issue which I believe was solved. I'd have to dig deeper 
into Menu code to find out what we did. Essentially, a click onto the 
decoration is not sent to the application itself, so the popup menu does not 
know when to dismiss. Again, I beleive we solved that, but I have to check.

> 5) When you click on the window decorations of the main window the popup
> should disappear - but does not (e.g. system menu) or X, or they should
> not be accessible at all.

Same.

> My current test platform is Ubuntu running KDE3, FLTK 1.3-r8514.

I don't have Kubuntu. Could you test if the regular popup menus work correctly 
for your window manager?

 - Matthias

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to