Browse Source

Run osx idle stuff when not embed

gh-pages
falkTX 10 years ago
parent
commit
4042431bf7
1 changed files with 14 additions and 6 deletions
  1. +14
    -6
      dgl/src/Window.cpp

+ 14
- 6
dgl/src/Window.cpp View File

@@ -80,6 +80,8 @@ public:
#elif defined(DGL_OS_LINUX)
xDisplay(nullptr),
xWindow(0)
#elif defined(DGL_OS_MAC)
fNeedsIdle(true),
#else
_dummy('\0')
#endif
@@ -102,6 +104,8 @@ public:
#elif defined(DGL_OS_LINUX)
xDisplay(nullptr),
xWindow(0)
#elif defined(DGL_OS_MAC)
fNeedsIdle(true), // FIXME - set false?
#else
_dummy('\0')
#endif
@@ -129,6 +133,8 @@ public:
#elif defined(DGL_OS_LINUX)
xDisplay(nullptr),
xWindow(0)
#elif defined(DGL_OS_MAC)
fNeedsIdle(parentId == 0),
#else
_dummy('\0')
#endif
@@ -241,12 +247,7 @@ public:
{
for (; fVisible && fModal.enabled;)
{
// idle()
puglProcessEvents(fView);

if (fModal.parent != nullptr)
fModal.parent->idle();

idle();
msleep(10);
}

@@ -492,6 +493,11 @@ public:
{
puglProcessEvents(fView);

#ifdef DGL_OS_MAC
if (fNeedsIdle)
puglImplIdle(fView);
#endif

if (fModal.enabled && fModal.parent != nullptr)
fModal.parent->idle();
}
@@ -713,6 +719,8 @@ private:
#elif defined(DGL_OS_LINUX)
Display* xDisplay;
::Window xWindow;
#elif defined(DGL_OS_MAC)
bool fNeedsIdle;
#else
char _dummy;
#endif


Loading…
Cancel
Save