From a291e1c004c3c31ae0b0bcd89165d4f5882ff95a Mon Sep 17 00:00:00 2001 From: "Hiroshi Takey F. (hiro2233)" Date: Mon, 1 Feb 2021 06:57:48 -0400 Subject: [PATCH] Fix a problem with wxGetDisplay() in wxGTK/MSW build Only define wxGetDisplay() in Unix builds. Closes https://github.com/wxWidgets/wxWidgets/pull/2206 --- include/wx/utils.h | 2 +- src/gtk/utilsgtk.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/wx/utils.h b/include/wx/utils.h index ff1dc72acf..ac5f6241d3 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -782,7 +782,7 @@ void WXDLLIMPEXP_CORE wxGetMousePosition( int* x, int* y ); // X11 Display access // ---------------------------------------------------------------------------- -#if defined(__X__) || defined(__WXGTK__) +#if defined(__X__) || (defined(__WXGTK__) && defined(__UNIX__)) #ifdef __WXGTK__ WXDLLIMPEXP_CORE void *wxGetDisplay(); diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 6dc15e1a2d..1437b7df59 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -72,6 +72,8 @@ void wxBell() // display characteristics // ---------------------------------------------------------------------------- +#if defined(__UNIX__) + void *wxGetDisplay() { return wxGetDisplayInfo().dpy; @@ -98,6 +100,8 @@ wxDisplayInfo wxGetDisplayInfo() return info; } +#endif // __UNIX__ + wxWindow* wxFindWindowAtPoint(const wxPoint& pt) { return wxGenericFindWindowAtPoint(pt);