mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-31 02:00:28 +01:00
test(editor): EU07_EDITOR_SELFTEST_HIDDEN runs a selftest in a window never shown nor focused, full screen or not, for the computer in use meanwhile
This commit is contained in:
@@ -968,7 +968,8 @@ GLFWwindow *eu07_application::window(int const Windowindex, bool visible, int wi
|
|||||||
if (keep_ownership)
|
if (keep_ownership)
|
||||||
m_windows.emplace_back(childwindow);
|
m_windows.emplace_back(childwindow);
|
||||||
|
|
||||||
glfwFocusWindow(m_windows.front()); // restore focus to main window
|
if (glfwGetWindowAttrib(m_windows.front(), GLFW_VISIBLE))
|
||||||
|
glfwFocusWindow(m_windows.front()); // restore focus to main window
|
||||||
|
|
||||||
return childwindow;
|
return childwindow;
|
||||||
}
|
}
|
||||||
@@ -1330,7 +1331,9 @@ int eu07_application::init_glfw()
|
|||||||
Global.bFullScreen = true;
|
Global.bFullScreen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto *mainwindow = window(-1, true, Global.window_size.x, Global.window_size.y, Global.bFullScreen ? monitor : nullptr, true, false);
|
// a selftest of the editor run while the computer is in use for something else draws into a window never shown nor focused
|
||||||
|
bool const shown{std::getenv("EU07_EDITOR_SELFTEST_HIDDEN") == nullptr};
|
||||||
|
auto *mainwindow = window(-1, shown, Global.window_size.x, Global.window_size.y, Global.bFullScreen && shown ? monitor : nullptr, true, false);
|
||||||
|
|
||||||
if (mainwindow == nullptr)
|
if (mainwindow == nullptr)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user