File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,21 @@ public void OnError(Exception error)
29
29
30
30
public void OnNext ( RawInputEventArgs value )
31
31
{
32
- if ( value is RawPointerEventArgs args
33
- && args . Root == _inputRoot
34
- && value . Device is IPointerDevice pointerDevice )
32
+ if ( value is RawDragEvent dragArgs )
33
+ {
34
+ // When a platform drag operation is in progress, the application does not receive
35
+ // pointer move events until after the drop event. This is a problem because if a
36
+ // popup is shown at the pointer position in the drop event, it will be shown at
37
+ // the position at which the drag was initiated, not the position at which the drop
38
+ // occurred.
39
+ //
40
+ // Solve this by updating the last known pointer position when a drag event occurs.
41
+ _lastKnownPosition = ( ( Visual ) _inputRoot ) . PointToScreen ( dragArgs . Location ) ;
42
+ }
43
+
44
+ else if ( value is RawPointerEventArgs args
45
+ && args . Root == _inputRoot
46
+ && value . Device is IPointerDevice pointerDevice )
35
47
{
36
48
if ( pointerDevice != _lastActivePointerDevice )
37
49
{
You can’t perform that action at this time.
0 commit comments