window manager added, window  size getting method refactored