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
|
||||
)
|
||||
message("Found wxWidgets version ${wxWidgets_VERSION}")
|
||||
if(${wxWidgets_VERSION} VERSION_LESS "2.9.4")
|
||||
message("At least 2.9.4 is required; ignoring found version")
|
||||
if(UNIX AND NOT APPLE)
|
||||
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)
|
||||
endif()
|
||||
endif(wxWidgets_FOUND)
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -826,11 +826,9 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
|
|||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight = height;
|
||||
}
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
int x, y;
|
||||
m_RenderParent->GetClientSize(&width, &height);
|
||||
m_RenderParent->GetPosition(&x, &y);
|
||||
wxRect client_rect = m_RenderParent->GetClientRect();
|
||||
X11Utils::SendClientEvent(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||
"RESIZE", x, y, width, height);
|
||||
"RESIZE", client_rect.x, client_rect.y, client_rect.width, client_rect.height);
|
||||
#endif
|
||||
m_LogWindow->Refresh();
|
||||
m_LogWindow->Update();
|
||||
|
|
Loading…
Reference in New Issue