Browse Source

Temporary debug measures

Signed-off-by: falkTX <falktx@falktx.com>
pull/272/head
falkTX 4 years ago
parent
commit
94cd0e0821
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 14 additions and 2 deletions
  1. +13
    -1
      dgl/src/ApplicationPrivateData.cpp
  2. +1
    -1
      dgl/src/WindowPrivateData.cpp

+ 13
- 1
dgl/src/ApplicationPrivateData.cpp View File

@@ -19,6 +19,8 @@

#include "pugl.hpp"

#include <ctime>

START_NAMESPACE_DGL

typedef std::list<DGL_NAMESPACE::Window*>::reverse_iterator WindowListReverseIterator;
@@ -38,7 +40,17 @@ Application::PrivateData::PrivateData(const bool standalone)
DISTRHO_SAFE_ASSERT_RETURN(world != nullptr,);

puglSetWorldHandle(world, this);
puglSetClassName(world, DISTRHO_MACRO_AS_STRING(DGL_NAMESPACE));

// FIXME
static int wc_count = 0;
char classNameBuf[256];
std::srand((std::time(NULL)));
std::snprintf(classNameBuf, sizeof(classNameBuf), "%s_%d-%d-%p",
DISTRHO_MACRO_AS_STRING(DGL_NAMESPACE), std::rand(), ++wc_count, this);
classNameBuf[sizeof(classNameBuf)-1] = '\0';
d_stderr("--------------------------------------------------------------- className is %s", classNameBuf);

puglSetClassName(world, classNameBuf);
#ifdef HAVE_X11
sofdFileDialogSetup(world);
#endif


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

@@ -627,7 +627,7 @@ void Window::PrivateData::onPuglClose()

void Window::PrivateData::onPuglFocus(const bool focus, const CrossingMode mode)
{
DGL_DBGp("onPuglFocus : %i %i\n", focus, mode);
DGL_DBGp("onPuglFocus : %i %i | %i\n", focus, mode, isClosed);

if (isClosed)
return;


Loading…
Cancel
Save