Reorder functions of ag-window.c to remove prototype need