How can I prevent rendering interrupts when I click window's caption or border?

I am trying to keep my window rendering when I resize or move window. I added my whole rendering to “Draw()” then I put those to callbacks. That works. The issue is when I (right-left) click window’s caption(header) I can not handle that event. Still, When I click only border’s resize area but do not move my cursor, I get same interrupt. I know those interrupts in “Win32” program. I need to learn it in GLFW. I could not find it. Can anyone please inform me about it?

Proper way on Windows to fix modal click on window title/menu and moving/resizing is to put your rendering in separate thread. Then you can keep on rendering regardless of window message loop blocking you.

did you mean this?

<thread>
Draw(GLFWwindow* window){ ... }
main{
...
	while (!glfwWindowShouldClose(window))
	{
		thread drawthread(Draw, window);
}
...
}

At that time I see infinite loading state on window.

You are creating thread on every frame. You should create thread only once, make sure GL context is set-up correctly there, and then you can render. Just make sure you are handling communication with main thread properly - as you will need to receive input events (keyboard/mouse) or other information (like windows position/size).

Alright, I did it based on information you gave.

Draw(GLFWwindow* window){
glfwMakeContextCurrent(window)
...
};
main(...){
...
glfwMakeContextCurrent(NULL);
	thread td2(Draw, window);
	while (!glfwWindowShouldClose(window))
	{
		glfwSwapBuffers(window);
		glfwPollEvents();
	}
	td2.join();
	glfwDestroyWindow(window);

	glfwTerminate();
	exit(EXIT_SUCCESS);
}

Now I do everything and I see no-interrupt. :innocent: