freebsd-ports/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Utils.cpp
zielonka michal 79e5fba255 cad/PrusaSlicer: update to 2.6.0
PR:		272730
Reported by:	michal.zielonka.8001@gmail.com
Approved by:	teodorsigaev@gmail.com (maintainer)
2023-07-28 14:47:57 +02:00

20 lines
948 B
C++

--- src/slic3r/GUI/GUI_Utils.cpp.orig 2023-07-25 11:03:21 UTC
+++ src/slic3r/GUI/GUI_Utils.cpp
@@ -48,7 +48,7 @@ void on_window_geometry(wxTopLevelWindow *tlw, std::fu
// cf. https://groups.google.com/forum/#!topic/wx-users/c7ntMt6piRI
// OTOH the geometry is available very soon, so we can call the callback right away
callback();
-#elif defined __linux__
+#elif defined(__linux__) || defined(__FreeBSD__)
tlw->Bind(wxEVT_SHOW, [=](wxShowEvent &evt) {
// On Linux, the geometry is only available after wxEVT_SHOW + CallAfter
// cf. https://groups.google.com/forum/?pli=1#!topic/wx-users/fERSXdpVwAI
@@ -116,7 +116,7 @@ int get_dpi_for_window(const wxWindow *window)
if (hdc == NULL) { return DPI_DEFAULT; }
return GetDeviceCaps(hdc, LOGPIXELSX);
}
-#elif defined __linux__
+#elif defined(__linux__) || defined(__FreeBSD__)
// TODO
return DPI_DEFAULT;
#elif defined __APPLE__