OpenCanopy: Do not delegate past pointer events
@@ -976,6 +976,7 @@ GuiDrawLoop (
UINT64 LoopStartTsc;
UINT64 LastTsc;
UINT64 NewLastTsc;
+ BOOLEAN ObjectHeld;
CONST GUI_IMAGE *CursorImage;
@@ -983,6 +984,7 @@ GuiDrawLoop (
mNumValidDrawReqs = 0;
HoldObject = NULL;
+ ObjectHeld = FALSE;
//
// Clear previous inputs.
@@ -1024,7 +1026,8 @@ GuiDrawLoop (
//
GuiPointerGetState (mPointerContext, &PointerState);
- if (PointerState.PrimaryDown && HoldObject == NULL) {
+ if (PointerState.PrimaryDown) {
+ if (!ObjectHeld && HoldObject == NULL) {
HoldObject = GuiObjDelegatePtrEvent (
DrawContext->Screen,
DrawContext,
@@ -1035,6 +1038,12 @@ GuiDrawLoop (
PointerState.X,
PointerState.Y
);
+
+ }
+
+ ObjectHeld = TRUE;
+ } else {
+ ObjectHeld = FALSE;
}
if (HoldObject != NULL) {
