changed #processEvent:
authorca
Mon, 03 Dec 2007 10:57:20 +0100
changeset 2203 919b6f0753fa
parent 2202 b465c7e48050
child 2204 bde4a7ef693a
changed #processEvent:
UIObjectView.st
--- a/UIObjectView.st	Mon Dec 03 10:56:56 2007 +0100
+++ b/UIObjectView.st	Mon Dec 03 10:57:20 2007 +0100
@@ -9,9 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
-
 "{ Package: 'stx:libtool2' }"
 
 ObjectView subclass:#UIObjectView
@@ -569,7 +566,7 @@
      the redraw when this happens.
      Return true, if I have eaten the event"
 
-    |evView x y p|
+    |evView p|
 
     self testMode ifTrue:[^ false].
 
@@ -597,9 +594,15 @@
         ^ true
     ].
 
-    x := anEvent x.
-    y := anEvent y.
-    p := device translatePoint:(x@y) fromView:evView toView:self.
+    anEvent isButtonMotionEvent ifTrue:[
+        "/ use current point - layout of underlaying view might change
+        "/ and computation dependent on origin is wrong
+        p := self sensor mousePoint.
+        p := device translatePoint:p fromView:nil toView:self.
+    ] ifFalse:[
+        p := Point x:(anEvent x) y:(anEvent y).
+        p := device translatePoint:p fromView:evView toView:self.
+    ].
 
     "/ patch the event
     anEvent x:p x.