MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / toggleFullscreen

Method toggleFullscreen

App/WindowController.cpp:245–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245void WindowController::toggleFullscreen() {
246 if (!window) {
247 return;
248 }
249
250 logWindowState("before-toggle", window, isFullscreen, windowedWasMaximized);
251
252 if (isFullscreen) {
253 applyWindowedState();
254 isFullscreen = false;
255 syncWindowedStateFromWindow();
256 logWindowState("after-toggle", window, isFullscreen, windowedWasMaximized);
257 return;
258 }
259
260 syncWindowedStateFromWindow();
261 GLFWmonitor* monitor = currentMonitor();
262 if (!monitor) {
263 monitor = monitorByIndex(windowedMonitorIndex);
264 }
265 if (!monitor) {
266 return;
267 }
268 windowedMonitorIndex = monitorIndex(monitor);
269 applyFullscreen(monitor);
270 isFullscreen = true;
271 logWindowState("after-toggle", window, isFullscreen, windowedWasMaximized);
272}
273
274UserSettings::WindowState WindowController::snapshot() {
275 UserSettings::WindowState state{};

Callers

nothing calls this directly

Calls 1

logWindowStateFunction · 0.85

Tested by

no test coverage detected