Browse Source

Fix build with DGL_DEBUG_EVENTS

Signed-off-by: falkTX <falktx@falktx.com>
pull/491/head
falkTX 3 months ago
parent
commit
0bafe97eff
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 11 additions and 15 deletions
  1. +10
    -14
      dgl/src/WindowPrivateData.cpp
  2. +1
    -1
      dgl/src/WindowPrivateData.hpp

+ 10
- 14
dgl/src/WindowPrivateData.cpp View File

@@ -579,11 +579,11 @@ void Window::PrivateData::runAsModal(const bool blockWait)
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// pugl events // 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,); 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) if (autoScaling)
{ {
@@ -1188,25 +1188,21 @@ static int printEvent(const PuglEvent* event, const char* prefix, const bool ver


if (verbose) { if (verbose) {
switch (event->type) { 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: case PUGL_CONFIGURE:
return PRINT("%sConfigure " PFMT " " PFMT "\n",
return PRINT("%sConfigure %d %d %d %d\n",
prefix, prefix,
event->configure.x, event->configure.x,
event->configure.y, event->configure.y,
event->configure.width, event->configure.width,
event->configure.height); event->configure.height);
case PUGL_UPDATE:
return 0; // fprintf(stderr, "%sUpdate\n", prefix);
case PUGL_EXPOSE: case PUGL_EXPOSE:
return PRINT("%sExpose " PFMT " " PFMT "\n",
return PRINT("%sExpose %d %d %d %d\n",
prefix, prefix,
event->expose.x, event->expose.x,
event->expose.y, event->expose.y,


+ 1
- 1
dgl/src/WindowPrivateData.hpp View File

@@ -181,7 +181,7 @@ struct Window::PrivateData : IdleCallback {
void runAsModal(bool blockWait); void runAsModal(bool blockWait);


// pugl events // pugl events
void onPuglConfigure(double width, double height);
void onPuglConfigure(uint width, uint height);
void onPuglExpose(); void onPuglExpose();
void onPuglClose(); void onPuglClose();
void onPuglFocus(bool focus, CrossingMode mode); void onPuglFocus(bool focus, CrossingMode mode);


Loading…
Cancel
Save