提交 6fab23fb 编写于 作者: M Marvin Häuser

OpenCanopy: Do not delegate past pointer events

上级 cfbf298e
......@@ -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,17 +1026,24 @@ GuiDrawLoop (
//
GuiPointerGetState (mPointerContext, &PointerState);
if (PointerState.PrimaryDown && HoldObject == NULL) {
HoldObject = GuiObjDelegatePtrEvent (
DrawContext->Screen,
DrawContext,
DrawContext->GuiContext,
GuiPointerPrimaryDown,
0,
0,
PointerState.X,
PointerState.Y
);
if (PointerState.PrimaryDown) {
if (!ObjectHeld && HoldObject == NULL) {
HoldObject = GuiObjDelegatePtrEvent (
DrawContext->Screen,
DrawContext,
DrawContext->GuiContext,
GuiPointerPrimaryDown,
0,
0,
PointerState.X,
PointerState.Y
);
}
ObjectHeld = TRUE;
} else {
ObjectHeld = FALSE;
}
if (HoldObject != NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册