From 7652eada41bd276c5ab12b9a55d51f14ddc48483 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 10 Oct 2011 17:12:42 +0000 Subject: [PATCH] Fix warnings about wxOSX_USE_CARBON being undefined when using g++. Test for __WXMAC__ before testing wxOSX_USE_CARBON to avoid -Wundef warnings from g++ in non-Mac builds. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/popupwin.h | 2 +- src/common/popupcmn.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/popupwin.h b/include/wx/popupwin.h index 4f451a644e..a4438261d4 100644 --- a/include/wx/popupwin.h +++ b/include/wx/popupwin.h @@ -134,7 +134,7 @@ protected: // wxOSX/Carbon doesn't generate mouse capture loss events currently so // poll for the capture loss ourselves. -#if wxOSX_USE_CARBON +#if defined(__WXMAC__) && wxOSX_USE_CARBON // check if the mouse needs captured or released void OnIdle(wxIdleEvent& event); #endif diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 36445b9087..bf9c45aa06 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -116,7 +116,7 @@ BEGIN_EVENT_TABLE(wxPopupFocusHandler, wxEvtHandler) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxPopupTransientWindow, wxPopupWindow) -#if wxOSX_USE_CARBON +#if defined(__WXMAC__) && wxOSX_USE_CARBON EVT_IDLE(wxPopupTransientWindow::OnIdle) #endif END_EVENT_TABLE() @@ -426,7 +426,7 @@ bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event)) return false; } -#if wxOSX_USE_CARBON +#if defined(__WXMAC__) && wxOSX_USE_CARBON void wxPopupTransientWindow::OnIdle(wxIdleEvent& event) { event.Skip(); -- 2.47.2