Fix a problem with wxGetDisplay() in wxGTK/MSW build

Only define wxGetDisplay() in Unix builds.

Closes https://github.com/wxWidgets/wxWidgets/pull/2206
This commit is contained in:
Hiroshi Takey F. (hiro2233)
2021-02-01 06:57:48 -04:00
committed by Vadim Zeitlin
parent 98d3a4ccdc
commit a291e1c004
2 changed files with 5 additions and 1 deletions

View File

@@ -782,7 +782,7 @@ void WXDLLIMPEXP_CORE wxGetMousePosition( int* x, int* y );
// X11 Display access // X11 Display access
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__X__) || defined(__WXGTK__) #if defined(__X__) || (defined(__WXGTK__) && defined(__UNIX__))
#ifdef __WXGTK__ #ifdef __WXGTK__
WXDLLIMPEXP_CORE void *wxGetDisplay(); WXDLLIMPEXP_CORE void *wxGetDisplay();

View File

@@ -72,6 +72,8 @@ void wxBell()
// display characteristics // display characteristics
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__UNIX__)
void *wxGetDisplay() void *wxGetDisplay()
{ {
return wxGetDisplayInfo().dpy; return wxGetDisplayInfo().dpy;
@@ -98,6 +100,8 @@ wxDisplayInfo wxGetDisplayInfo()
return info; return info;
} }
#endif // __UNIX__
wxWindow* wxFindWindowAtPoint(const wxPoint& pt) wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
{ {
return wxGenericFindWindowAtPoint(pt); return wxGenericFindWindowAtPoint(pt);