From 0bafe97eff942e2dea68417730a0f81c9c9db3be Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 26 Jan 2025 20:59:59 +0100 Subject: [PATCH] Fix build with DGL_DEBUG_EVENTS Signed-off-by: falkTX --- dgl/src/WindowPrivateData.cpp | 24 ++++++++++-------------- dgl/src/WindowPrivateData.hpp | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp index a2afec6b..3644bc49 100644 --- a/dgl/src/WindowPrivateData.cpp +++ b/dgl/src/WindowPrivateData.cpp @@ -579,11 +579,11 @@ void Window::PrivateData::runAsModal(const bool blockWait) // ----------------------------------------------------------------------- // pugl events -void Window::PrivateData::onPuglConfigure(const double width, const double height) +void Window::PrivateData::onPuglConfigure(const uint width, const uint height) { DISTRHO_SAFE_ASSERT_INT2_RETURN(width > 1 && height > 1, width, height,); - DGL_DBGp("PUGL: onReshape : %f %f\n", width, height); + DGL_DBGp("PUGL: onReshape : %d %d\n", width, height); if (autoScaling) { @@ -1188,25 +1188,21 @@ static int printEvent(const PuglEvent* event, const char* prefix, const bool ver if (verbose) { switch (event->type) { - case PUGL_CREATE: - return fprintf(stderr, "%sCreate\n", prefix); - case PUGL_DESTROY: - return fprintf(stderr, "%sDestroy\n", prefix); - case PUGL_MAP: - return fprintf(stderr, "%sMap\n", prefix); - case PUGL_UNMAP: - return fprintf(stderr, "%sUnmap\n", prefix); - case PUGL_UPDATE: - return 0; // fprintf(stderr, "%sUpdate\n", prefix); + case PUGL_REALIZE: + return PRINT("%sRealize\n", prefix); + case PUGL_UNREALIZE: + return PRINT("%sUnrealize\n", prefix); case PUGL_CONFIGURE: - return PRINT("%sConfigure " PFMT " " PFMT "\n", + return PRINT("%sConfigure %d %d %d %d\n", prefix, event->configure.x, event->configure.y, event->configure.width, event->configure.height); + case PUGL_UPDATE: + return 0; // fprintf(stderr, "%sUpdate\n", prefix); case PUGL_EXPOSE: - return PRINT("%sExpose " PFMT " " PFMT "\n", + return PRINT("%sExpose %d %d %d %d\n", prefix, event->expose.x, event->expose.y, diff --git a/dgl/src/WindowPrivateData.hpp b/dgl/src/WindowPrivateData.hpp index 0983a6dc..ed7b971f 100644 --- a/dgl/src/WindowPrivateData.hpp +++ b/dgl/src/WindowPrivateData.hpp @@ -181,7 +181,7 @@ struct Window::PrivateData : IdleCallback { void runAsModal(bool blockWait); // pugl events - void onPuglConfigure(double width, double height); + void onPuglConfigure(uint width, uint height); void onPuglExpose(); void onPuglClose(); void onPuglFocus(bool focus, CrossingMode mode);