зеркало из https://github.com/mozilla/gecko-dev.git
Bug 914776 - Fix touch event coordinates when rotated, r=m1
This commit is contained in:
Родитель
a86e754ab9
Коммит
86a4069ed0
|
@ -467,9 +467,18 @@ GeckoInputReaderPolicy::setDisplayInfo()
|
||||||
"Orientation enums not matched!");
|
"Orientation enums not matched!");
|
||||||
|
|
||||||
DisplayViewport viewport;
|
DisplayViewport viewport;
|
||||||
viewport.setNonDisplayViewport(gScreenBounds.width, gScreenBounds.height);
|
|
||||||
viewport.displayId = 0;
|
viewport.displayId = 0;
|
||||||
viewport.orientation = nsScreenGonk::GetRotation();
|
viewport.orientation = nsScreenGonk::GetRotation();
|
||||||
|
viewport.physicalRight = viewport.deviceWidth = gScreenBounds.width;
|
||||||
|
viewport.physicalBottom = viewport.deviceHeight = gScreenBounds.height;
|
||||||
|
if (viewport.orientation == DISPLAY_ORIENTATION_90 ||
|
||||||
|
viewport.orientation == DISPLAY_ORIENTATION_270) {
|
||||||
|
viewport.logicalRight = gScreenBounds.height;
|
||||||
|
viewport.logicalBottom = gScreenBounds.width;
|
||||||
|
} else {
|
||||||
|
viewport.logicalRight = gScreenBounds.width;
|
||||||
|
viewport.logicalBottom = gScreenBounds.height;
|
||||||
|
}
|
||||||
mConfig.setDisplayInfo(false, viewport);
|
mConfig.setDisplayInfo(false, viewport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче