Fix hide mouse cursor on linux.

Fix emulator window position when rendering to main on linux.
Allow building against wxWidgets 2.9.3 on linux.
This commit is contained in:
Glenn Rice
2012-05-02 14:40:40 -05:00
parent 1974938c5a
commit 40640217f1
3 changed files with 19 additions and 8 deletions

View File

@ -653,6 +653,11 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
break;
#ifdef __WXGTK__
case WM_USER_CREATE:
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
break;
case IDM_PANIC:
{
wxString caption = event.GetString().BeforeFirst(':');
@ -676,8 +681,11 @@ void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height)
if (!wxIsMainThread())
wxMutexGuiEnter();
#endif
m_RenderParent->GetClientSize(&width, &height);
m_RenderParent->GetPosition(&x, &y);
wxRect client_rect = m_RenderParent->GetClientRect();
width = client_rect.width;
height = client_rect.height;
x = client_rect.x;
y = client_rect.y;
#ifdef __WXGTK__
if (!wxIsMainThread())
wxMutexGuiLeave();