Move window-specific code to src/fe_window.cpp