MenuPanel.st
changeset 6025 2f06785c93ab
parent 6021 15bfa1dd30de
child 6029 8b004782d14f
--- a/MenuPanel.st	Mon Mar 04 22:46:22 2019 +0100
+++ b/MenuPanel.st	Tue Mar 05 02:21:28 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1997 by eXept Software AG
               All Rights Reserved
@@ -4583,9 +4581,14 @@
                     "give up"
                     'MenuPanel [warning]: could not grab pointer' errorPrintCR.
                     self unmap
-                ]
-            ]
-        ].
+                ].
+            ].
+            device activePointerGrab == self ifFalse:[
+                'MenuPanel [warning]: could not grab pointer' errorPrintCR.
+            ].                
+        ] ifFalse:[
+            'MenuPanel [warning]: already pointer owner' errorPrintCR.
+        ].    
 
         (activeGrab := device activeKeyboardGrab) ~~ self ifTrue:[
             device sync.
@@ -4595,12 +4598,17 @@
 "/            ].
             sensor flushKeyboardFor:nil.
             self grabKeyboard.
+            device activeKeyboardGrab == self ifFalse:[
+                'MenuPanel [warning]: could not grab keyboard' errorPrintCR.
+            ].                
+        ] ifFalse:[
+            'MenuPanel [warning]: already keyboard owner' errorPrintCR.
         ]
     ]
 
-
-    "Modified: / 2.2.1998 / 23:43:59 / stefan"
-    "Modified: / 15.3.1999 / 12:01:38 / cg"
+    "Modified: / 02-02-1998 / 23:43:59 / stefan"
+    "Modified: / 15-03-1999 / 12:01:38 / cg"
+    "Modified: / 05-03-2019 / 01:50:44 / Claus Gittinger"
 !
 
 grabPointerWithCursor:aCursorOrNil
@@ -5211,7 +5219,7 @@
      we have non translated sub menus (when using them later for viewing).
      Problem expecco Menu 'View' was somethimes untranslated and somethimes not.
      Dependent if this code was called before the user did open (instantiate) the menu via the application.
-     May also the shortcuts itself could vary when translated 'Open &File' -> 'Datei &öffnen' ????"
+     May also the shortcuts itself could vary when translated 'Open &File' -> 'Datei &öffnen' ????"
     Menu::NeedResourcesQuery answer:true do:[
 "/    Menu::NeedResourcesQuery answer:false do:[
         [true] whileTrue:[