* BUG: Menu events are propagated to the parent if they are not handled in 
  the child.


git-svn-id: svn://localhost/gambas/trunk@3520 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2011-01-30 19:58:21 +00:00
parent c3d0079235
commit 644e472c3f
2 changed files with 20 additions and 14 deletions

View file

@ -182,19 +182,27 @@ bool gb_raise_MouseEvent(gControl *sender, int type)
case gEvent_MouseMenu:
if (GB.CanRaise(ob, EVENT_Menu))
for(;;)
{
GB.Raise(ob, EVENT_Menu, 0);
return true;
}
if (ob->popup)
{
gMainWindow *window = sender->window();
gMenu *menu = gMenu::findFromName(window, ob->popup);
if (menu)
menu->popup();
return true;
if (GB.CanRaise(ob, EVENT_Menu))
{
GB.Raise(ob, EVENT_Menu, 0);
return true;
}
if (ob->popup)
{
gMainWindow *window = sender->window();
gMenu *menu = gMenu::findFromName(window, ob->popup);
if (menu)
menu->popup();
return true;
}
if (sender->isTopLevel())
break;
ob = GetObject(sender->parent());
}
break;

View file

@ -500,8 +500,6 @@ static void gambas_handle_event(GdkEvent *event)
{
gApplication::exitLoop(control);
}
if (control->_proxy_for)
{