From 88d80e22ef8628b33fd0991889f15aba10a97f69 Mon Sep 17 00:00:00 2001 From: tusharsingh09 Date: Sat, 29 Jan 2022 17:07:50 +0530 Subject: [PATCH] Fixed error while handling hidden windows --- src/rcore.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index e6b25e94a..beb63234b 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -928,10 +928,18 @@ void InitWindowAt(int width, int height, int x, int y, const char* title) if(x <= 0) x = 0; if(y <= 25) y = 25; - SetConfigFlags(FLAG_WINDOW_HIDDEN); - InitWindow(width, height, title); - SetWindowPosition(x, y); - glfwShowWindow(CORE.Window.handle); + if((CORE.Window.flags & FLAG_WINDOW_HIDDEN) > 0) + { + InitWindow(width, height, title); + SetWindowPosition(x, y); + } + else + { + SetConfigFlags(FLAG_WINDOW_HIDDEN); + InitWindow(width, height, title); + SetWindowPosition(x, y); + glfwShowWindow(CORE.Window.handle); + } #endif }