Fix: set force close only when dealing with top frames

Fix the previous commit in a better way to simulate the previous
solution (but do it from renderer): only try to set the flag on
the first time.