| 4975 | } |
| 4976 | |
| 4977 | void GuiManager::queueUiVisibilityToggle() { |
| 4978 | if (!viewer_) { |
| 4979 | return; |
| 4980 | } |
| 4981 | |
| 4982 | if (viewer_->isOnViewerThread()) { |
| 4983 | requestUiVisibilityToggle(); |
| 4984 | return; |
| 4985 | } |
| 4986 | |
| 4987 | const bool posted = viewer_->postWork(VisualizerImpl::WorkItem{ |
| 4988 | .run = [this] { |
| 4989 | requestUiVisibilityToggle(); |
| 4990 | }, |
| 4991 | .cancel = {}, |
| 4992 | }); |
| 4993 | if (!posted) { |
| 4994 | LOG_DEBUG("Dropping UI visibility transition request because the viewer is shutting down"); |
| 4995 | } |
| 4996 | } |
| 4997 | |
| 4998 | void GuiManager::requestUiVisibilityToggle() { |
| 4999 | auto* const wm = viewer_ ? viewer_->getWindowManager() : nullptr; |
nothing calls this directly
no test coverage detected