If you're putting this code in `AbstractWindow`, shouldn't the WX backend be updated to use this code as well?