I glued small very powerful magnet to underside and a similar sized disc to top of window. Sorts itself out when you open and close.