GLFW close and restore window

I am using Ubuntu and want to leave full screen mode for a while and then go back to full screen again. I am not sure how to best do this. I tried the following:


glfwCloseWindow();
while(glfwGetWindowParam(GLFW_OPENED)) {
	glfwPollEvents();
}

Immediately after this, the window is still open. How can I find out when the window has actually closed?

There is the same problem if I try glfwIconifyWindow().

It’s probably a design issue in GLFW. GLFW was written with games in mind, and many games are just fine with not being able to switch from fullscreen to windowed and back. You may want to ask directly on their mailing lists or something.