Bug 745077 - Reconfigure InputReader on screen rotation. r=mwu a=b2g-only

This commit is contained in:
Kan-Ru Chen 2012-04-25 11:59:01 +08:00
parent 195432d5ee
commit d3400d40e1
3 changed files with 11 additions and 1 deletions

View File

@ -696,8 +696,15 @@ nsAppShell::NotifyNativeEvent()
write(signalfds[1], "w", 1);
}
/*static*/ void
/* static */ void
nsAppShell::NotifyScreenInitialized()
{
gAppShell->InitInputDevices();
}
/* static */ void
nsAppShell::NotifyScreenRotation()
{
gAppShell->mReaderPolicy->setDisplayInfo();
gAppShell->mReader->requestRefreshConfiguration(InputReaderConfiguration::CHANGE_DISPLAY_INFO);
}

View File

@ -98,6 +98,7 @@ public:
void NotifyNativeEvent();
static void NotifyScreenInitialized();
static void NotifyScreenRotation();
protected:
virtual ~nsAppShell();

View File

@ -681,6 +681,8 @@ nsScreenGonk::SetRotation(PRUint32 aRotation)
sVirtualBounds.height,
!i);
nsAppShell::NotifyScreenRotation();
return NS_OK;
}