Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void WindowContainer::Show(const Vector& Position)
- {
- if(_Running)
- return;
- _Running = true;
- WindowSystem::RegisterWindow(*this, Position);
- _RunningMutex.lock();
- _RunningMutex.lock(); // Lock the thread, eventually the input thread in the
- // WindowSystem will call `this->Close()` where the
- // mutex will be unlocked, and allowed to continue.
- _RunningMutex.unlock(); // for consistancy sake, remove the first lock.
- //while(_Running)
- // Util::Sleep(1.0 / 10.0); // check 10 times per second
- }
- void WindowContainer::Close()
- {
- if(!_Running)
- return;
- WindowSystem::UnregisterWindow(*this);
- _Running = false;
- _RunningMutex.unlock();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement