updated windowing on pwin.cpp