Fix window size and mouse problems on Mac; implement window.get_dw()/get_dh()