Introduce window.dw and window.dh; use them in widgets.py