summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2020-12-03 20:16:35 +0100
committerRay <[email protected]>2020-12-03 20:16:35 +0100
commit0540f0ad3221e8deced607d80936ae1fc0f39434 (patch)
treeecb31eafae6ed08fae210aaf6d0932ae5cdc98d0 /src
parent84ab00d52e66d7a9cec7d05c8dbede5e6a3f31eb (diff)
downloadraylib-0540f0ad3221e8deced607d80936ae1fc0f39434.tar.gz
raylib-0540f0ad3221e8deced607d80936ae1fc0f39434.zip
Review window flags
Diffstat (limited to 'src')
-rw-r--r--src/core.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core.c b/src/core.c
index 5de15394..ae833b2b 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1092,8 +1092,8 @@ void MaximizeWindow(void)
void MinimizeWindow(void)
{
#if defined(PLATFORM_DESKTOP)
+ // NOTE: Following function launches callback that sets appropiate flag!
glfwIconifyWindow(CORE.Window.handle);
- CORE.Window.flags |= FLAG_WINDOW_MINIMIZED;
#endif
}
@@ -3108,9 +3108,12 @@ static bool InitGraphicsDevice(int width, int height)
if ((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0) glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // Resizable window
else glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); // Avoid window being resizable
- if ((CORE.Window.flags & FLAG_WINDOW_MAXIMIZED) > 0) glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);
- else glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE);
-
+ // Disable FLAG_WINDOW_MINIMIZED, not supported on initialization
+ if ((CORE.Window.flags & FLAG_WINDOW_MINIMIZED) > 0) CORE.Window.flags &= ~FLAG_WINDOW_MINIMIZED;
+
+ // Disable FLAG_WINDOW_MAXIMIZED, not supported on initialization
+ if ((CORE.Window.flags & FLAG_WINDOW_MAXIMIZED) > 0) CORE.Window.flags &= ~FLAG_WINDOW_MAXIMIZED;
+
if ((CORE.Window.flags & FLAG_WINDOW_UNFOCUSED) > 0) glfwWindowHint(GLFW_FOCUSED, GLFW_FALSE);
else glfwWindowHint(GLFW_FOCUSED, GLFW_TRUE);