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:
parent
1974938c5a
commit
40640217f1
|
@ -489,8 +489,13 @@ if(NOT DISABLE_WX)
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
)
|
)
|
||||||
message("Found wxWidgets version ${wxWidgets_VERSION}")
|
message("Found wxWidgets version ${wxWidgets_VERSION}")
|
||||||
if(${wxWidgets_VERSION} VERSION_LESS "2.9.4")
|
if(UNIX AND NOT APPLE)
|
||||||
message("At least 2.9.4 is required; ignoring found version")
|
set(wxMIN_VERSION "2.9.3")
|
||||||
|
else()
|
||||||
|
set(wxMIN_VERSION "2.9.4")
|
||||||
|
endif()
|
||||||
|
if(${wxWidgets_VERSION} VERSION_LESS ${wxMIN_VERSION})
|
||||||
|
message("At least ${wxMIN_VERSION} is required; ignoring found version")
|
||||||
unset(wxWidgets_FOUND)
|
unset(wxWidgets_FOUND)
|
||||||
endif()
|
endif()
|
||||||
endif(wxWidgets_FOUND)
|
endif(wxWidgets_FOUND)
|
||||||
|
|
|
@ -653,6 +653,11 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
|
case WM_USER_CREATE:
|
||||||
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||||
|
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
||||||
|
break;
|
||||||
|
|
||||||
case IDM_PANIC:
|
case IDM_PANIC:
|
||||||
{
|
{
|
||||||
wxString caption = event.GetString().BeforeFirst(':');
|
wxString caption = event.GetString().BeforeFirst(':');
|
||||||
|
@ -676,8 +681,11 @@ void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||||
if (!wxIsMainThread())
|
if (!wxIsMainThread())
|
||||||
wxMutexGuiEnter();
|
wxMutexGuiEnter();
|
||||||
#endif
|
#endif
|
||||||
m_RenderParent->GetClientSize(&width, &height);
|
wxRect client_rect = m_RenderParent->GetClientRect();
|
||||||
m_RenderParent->GetPosition(&x, &y);
|
width = client_rect.width;
|
||||||
|
height = client_rect.height;
|
||||||
|
x = client_rect.x;
|
||||||
|
y = client_rect.y;
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
if (!wxIsMainThread())
|
if (!wxIsMainThread())
|
||||||
wxMutexGuiLeave();
|
wxMutexGuiLeave();
|
||||||
|
|
|
@ -826,11 +826,9 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight = height;
|
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight = height;
|
||||||
}
|
}
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#if defined(HAVE_X11) && HAVE_X11
|
||||||
int x, y;
|
wxRect client_rect = m_RenderParent->GetClientRect();
|
||||||
m_RenderParent->GetClientSize(&width, &height);
|
|
||||||
m_RenderParent->GetPosition(&x, &y);
|
|
||||||
X11Utils::SendClientEvent(X11Utils::XDisplayFromHandle(GetHandle()),
|
X11Utils::SendClientEvent(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||||
"RESIZE", x, y, width, height);
|
"RESIZE", client_rect.x, client_rect.y, client_rect.width, client_rect.height);
|
||||||
#endif
|
#endif
|
||||||
m_LogWindow->Refresh();
|
m_LogWindow->Refresh();
|
||||||
m_LogWindow->Update();
|
m_LogWindow->Update();
|
||||||
|
|
Loading…
Reference in New Issue