mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 903368 - Don't convert coordinates in widget/winrt InitEvent from logical to physical. r=masayuki
This commit is contained in:
parent
da8ed5631f
commit
bfa277cf27
@ -37,6 +37,8 @@ public:
|
||||
|
||||
/*
|
||||
* Init a standard gecko event for this widget.
|
||||
* @param aEvent the event to initialize.
|
||||
* @param aPoint message position in physical coordinates.
|
||||
*/
|
||||
virtual void InitEvent(nsGUIEvent& aEvent, nsIntPoint* aPoint = nullptr) = 0;
|
||||
|
||||
|
@ -997,16 +997,16 @@ void MetroWidget::UserActivity()
|
||||
}
|
||||
}
|
||||
|
||||
// InitEvent assumes physical coordinates and is used by shared win32 code. Do
|
||||
// not hand winrt event coordinates to this routine.
|
||||
void
|
||||
MetroWidget::InitEvent(nsGUIEvent& event, nsIntPoint* aPoint)
|
||||
{
|
||||
if (!aPoint) {
|
||||
event.refPoint.x = event.refPoint.y = 0;
|
||||
} else {
|
||||
CSSIntPoint cssPoint(aPoint->x, aPoint->y);
|
||||
LayoutDeviceIntPoint layoutDeviceIntPoint = CSSIntPointToLayoutDeviceIntPoint(cssPoint);
|
||||
event.refPoint.x = layoutDeviceIntPoint.x;
|
||||
event.refPoint.y = layoutDeviceIntPoint.y;
|
||||
event.refPoint.x = aPoint->x;
|
||||
event.refPoint.y = aPoint->y;
|
||||
}
|
||||
event.time = ::GetMessageTime();
|
||||
}
|
||||
|
@ -69,10 +69,12 @@ public:
|
||||
static HWND GetICoreWindowHWND() { return sICoreHwnd; }
|
||||
|
||||
// nsWindowBase
|
||||
virtual void InitEvent(nsGUIEvent& aEvent, nsIntPoint* aPoint = nullptr) MOZ_OVERRIDE;
|
||||
virtual bool DispatchWindowEvent(nsGUIEvent* aEvent) MOZ_OVERRIDE;
|
||||
virtual bool IsTopLevelWidget() MOZ_OVERRIDE { return true; }
|
||||
virtual nsWindowBase* GetParentWindowBase(bool aIncludeOwner) MOZ_OVERRIDE { return nullptr; }
|
||||
// InitEvent assumes physical coordinates and is used by shared win32 code. Do
|
||||
// not hand winrt event coordinates to this routine.
|
||||
virtual void InitEvent(nsGUIEvent& aEvent, nsIntPoint* aPoint = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
// nsBaseWidget
|
||||
virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user