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

Function logWindowState

App/WindowController.cpp:7–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6namespace {
7void logWindowState(const char* label, GLFWwindow* window, bool isFullscreen, bool windowedWasMaximized) {
8 if (!window) {
9 std::cerr << "[WindowController] " << label << " window=null" << std::endl;
10 return;
11 }
12
13 int x = 0;
14 int y = 0;
15 int width = 0;
16 int height = 0;
17 glfwGetWindowPos(window, &x, &y);
18 glfwGetWindowSize(window, &width, &height);
19
20 std::cerr
21 << "[WindowController] " << label
22 << " ptr=" << window
23 << " fullscreen=" << isFullscreen
24 << " monitor=" << glfwGetWindowMonitor(window)
25 << " decorated=" << glfwGetWindowAttrib(window, GLFW_DECORATED)
26 << " maximized=" << glfwGetWindowAttrib(window, GLFW_MAXIMIZED)
27 << " focused=" << glfwGetWindowAttrib(window, GLFW_FOCUSED)
28 << " iconified=" << glfwGetWindowAttrib(window, GLFW_ICONIFIED)
29 << " savedMaximized=" << windowedWasMaximized
30 << " pos=(" << x << "," << y << ")"
31 << " size=(" << width << "x" << height << ")"
32 << std::endl;
33}
34
35bool monitorWorkArea(GLFWmonitor* monitor, int& x, int& y, int& width, int& height) {
36 if (!monitor) {

Callers 1

toggleFullscreenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected