# HG changeset patch # User ca # Date 944685520 -3600 # Node ID 302847f5d01d5d97a9034d30480a6342ba115fce # Parent 99763d5655ce07f28213b4ad325a158d9d89caa5 grabbing changed to restore grab at hiding time, to allow popups in popups and ext-comboBoxes diff -r 99763d5655ce -r 302847f5d01d PopUpMenu.st --- a/PopUpMenu.st Tue Dec 07 14:03:50 1999 +0100 +++ b/PopUpMenu.st Wed Dec 08 21:38:40 1999 +0100 @@ -1220,6 +1220,15 @@ ]. "Modified: 25.2.1997 / 22:11:53 / cg" +! + +hideForAction + "hide the menu - if there are any pop-up-submenus, hide them also. + Any superMenu is not asked to regain control, since we are going to + hide them also." + + menuView hideSubmenu. + super hide. ! ! !PopUpMenu methodsFor:'dummy'! @@ -1450,11 +1459,14 @@ ! regainControl - device ungrabPointer. - device ungrabKeyboard. - shown ifTrue:[ - device grabPointerInView:self. - device grabKeyboardInView:self. +|g| + ((g := device activePointerGrab) ~~ self) ifTrue:[ + self forceUngrabPointer. + self forceUngrabKeyboard. + shown ifTrue:[ + self grabPointer. + self grabKeyboard. + ] ]. "Modified: / 20.11.1997 / 00:32:32 / cg" @@ -1524,5 +1536,5 @@ !PopUpMenu class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.82 1999-12-07 13:03:50 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.83 1999-12-08 20:38:40 ca Exp $' ! !