Skip to content

Commit

Permalink
Bug 914776 - Fix touch event coordinates when rotated, r=m1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwu committed Sep 24, 2013
1 parent a86e754 commit 86a4069
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion widget/gonk/nsAppShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,18 @@ GeckoInputReaderPolicy::setDisplayInfo()
"Orientation enums not matched!");

DisplayViewport viewport;
viewport.setNonDisplayViewport(gScreenBounds.width, gScreenBounds.height);
viewport.displayId = 0;
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);
}

Expand Down

0 comments on commit 86a4069

Please sign in to comment.