Remove unnecessary wxUSE_DISPLAY preprocessor checks
Most of the methods of wxDisplay are always available, they just only support primary display when wxUSE_DISPLAY==0, so there is no need to check for wxUSE_DISPLAY before using them as they already contain the only possible fallback anyhow and such checks are useless. This incidentally closes #18115, due to removing "#if wxUSE_DISPLAY" around wx/display.h inclusion.
This commit is contained in:
@@ -44,9 +44,7 @@
|
||||
#include "wx/textwrapper.h"
|
||||
#include "wx/modalhook.h"
|
||||
|
||||
#if wxUSE_DISPLAY
|
||||
#include "wx/display.h"
|
||||
#endif
|
||||
|
||||
extern WXDLLEXPORT_DATA(const char) wxDialogNameStr[] = "dialog";
|
||||
|
||||
@@ -873,11 +871,7 @@ int wxStandardDialogLayoutAdapter::DoMustScroll(wxDialog* dialog, wxSize& window
|
||||
wxSize minWindowSize = dialog->GetSizer()->GetMinSize();
|
||||
windowSize = dialog->GetSize();
|
||||
windowSize = wxSize(wxMax(windowSize.x, minWindowSize.x), wxMax(windowSize.y, minWindowSize.y));
|
||||
#if wxUSE_DISPLAY
|
||||
displaySize = wxDisplay(wxDisplay::GetFromWindow(dialog)).GetClientArea().GetSize();
|
||||
#else
|
||||
displaySize = wxGetClientDisplayRect().GetSize();
|
||||
#endif
|
||||
|
||||
int flags = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user