Use geometry, seems to fix cases when window is placed incorrectly and window decoration is not visible