From 017bbdf5162f91af5fbf101eb8cd7909ff115be7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 31 Dec 2015 00:21:24 +0100 Subject: [PATCH] Define ToDIP() in wxHAVE_DPI_INDEPENDENT_PIXELS case too Previously any code using this function wouldn't link under GTK+ 3 or OS X where wxHAVE_DPI_INDEPENDENT_PIXELS are defined. Closes #17310. --- include/wx/window.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/wx/window.h b/include/wx/window.h index 02f5d6e71d..a8e88ece16 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1994,7 +1994,9 @@ inline wxWindow *wxWindowBase::GetGrandParent() const #ifdef wxHAVE_DPI_INDEPENDENT_PIXELS -// FromDIP() becomes trivial in this case, so make it inline to avoid overhead. +// FromDIP() and ToDIP() become trivial in this case, so make them inline to +// avoid any overhead. + /* static */ inline wxSize wxWindowBase::FromDIP(const wxSize& sz, const wxWindowBase* WXUNUSED(w)) @@ -2002,6 +2004,13 @@ wxWindowBase::FromDIP(const wxSize& sz, const wxWindowBase* WXUNUSED(w)) return sz; } +/* static */ +inline wxSize +wxWindowBase::ToDIP(const wxSize& sz, const wxWindowBase* WXUNUSED(w)) +{ + return sz; +} + #endif // wxHAVE_DPI_INDEPENDENT_PIXELS // ----------------------------------------------------------------------------