mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841228 - Defect - Hover state on buttons (like the bookmark star) persists after you tap the button. r=jimm
This commit is contained in:
parent
851b1209b8
commit
baddda006b
@ -1265,6 +1265,23 @@ MetroInput::OnTapped(UI::Input::IGestureRecognizer* aSender,
|
|||||||
// Send the mouseup
|
// Send the mouseup
|
||||||
mouseEvent.message = NS_MOUSE_BUTTON_UP;
|
mouseEvent.message = NS_MOUSE_BUTTON_UP;
|
||||||
DispatchEventIgnoreStatus(&mouseEvent);
|
DispatchEventIgnoreStatus(&mouseEvent);
|
||||||
|
|
||||||
|
// Send one more mousemove to avoid getting a hover state.
|
||||||
|
// In the Metro environment for any application, a tap does not imply a
|
||||||
|
// mouse cursor move. In desktop environment for any application a tap
|
||||||
|
// does imply a cursor move.
|
||||||
|
POINT point;
|
||||||
|
if (GetCursorPos(&point)) {
|
||||||
|
ScreenToClient((HWND)mWidget->GetNativeData(NS_NATIVE_WINDOW), &point);
|
||||||
|
Foundation::Point oldMousePosition;
|
||||||
|
oldMousePosition.X = static_cast<FLOAT>(point.x);
|
||||||
|
oldMousePosition.Y = static_cast<FLOAT>(point.y);
|
||||||
|
mouseEvent.refPoint = MetroUtils::LogToPhys(oldMousePosition);
|
||||||
|
mouseEvent.message = NS_MOUSE_MOVE;
|
||||||
|
mouseEvent.button = 0;
|
||||||
|
|
||||||
|
DispatchEventIgnoreStatus(&mouseEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user