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

Method syncWindowedStateFromWindow

App/WindowController.cpp:168–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void WindowController::syncWindowedStateFromWindow() {
169 if (!window || isFullscreen) {
170 return;
171 }
172
173 windowedWasMaximized = glfwGetWindowAttrib(window, GLFW_MAXIMIZED) == GLFW_TRUE;
174 GLFWmonitor* monitor = currentMonitor();
175 windowedMonitorIndex = monitorIndex(monitor);
176 if (!windowedWasMaximized) {
177 glfwGetWindowPos(window, &windowedX, &windowedY);
178 glfwGetWindowSize(window, &windowedWidth, &windowedHeight);
179 return;
180 }
181
182 if (monitor && monitorWorkArea(monitor, windowedX, windowedY, windowedWidth, windowedHeight)) {
183 return;
184 }
185
186 glfwGetWindowPos(window, &windowedX, &windowedY);
187 glfwGetWindowSize(window, &windowedWidth, &windowedHeight);
188}
189
190void WindowController::applyWindowedState() {
191 if (!window) {

Callers

nothing calls this directly

Calls 1

monitorWorkAreaFunction · 0.85

Tested by

no test coverage detected