Remove pre-wxWidgets 3.1.3 DPI fallback code

Since we now target wxWidgets 3.3, the custom DPI change event
workaround (DpiChangedEvent, EVT_DPI_CHANGED_SLICER,
register_win32_dpi_event) is dead code. wxWidgets 3.1.3+ provides
native wxEVT_DPI_CHANGED / wxDPIChangedEvent which is already
wired up in the "true" branch of the version guards.

Removes:
- DpiChangedEvent struct and EVT_DPI_CHANGED_SLICER declaration/definition
- register_win32_dpi_event() function and its call site
- All associated #if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3) guards
This commit is contained in:
SoftFever
2026-03-24 20:28:12 +08:00
parent 2d7e26292b
commit 195d22d5cb
5 changed files with 152 additions and 57 deletions

View File

@@ -148,10 +148,6 @@ void on_window_geometry(wxTopLevelWindow *tlw, std::function<void()> callback)
#endif
}
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
wxDEFINE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
#endif // !wxVERSION_EQUAL_OR_GREATER_THAN
#ifdef _WIN32
template<class F> typename F::FN winapi_get_function(const wchar_t *dll, const char *fn_name) {
static HINSTANCE dll_handle = LoadLibraryExW(dll, nullptr, 0);