| 35 | } |
| 36 | |
| 37 | Window::ScopedGraphicsContext::ScopedGraphicsContext(Window& win, Window& transientWin) |
| 38 | : window(win), |
| 39 | ppData(transientWin.pData), |
| 40 | active(false), |
| 41 | reenter(window.pData->view != nullptr) |
| 42 | { |
| 43 | if (reenter) |
| 44 | { |
| 45 | puglBackendLeave(ppData->view); |
| 46 | active = puglBackendEnter(window.pData->view); |
| 47 | if (active) |
| 48 | window.pData->createContextIfNeeded(); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | Window::ScopedGraphicsContext::~ScopedGraphicsContext() |
| 53 | { |
nothing calls this directly
no test coverage detected