Replace window size by view port rectangle

Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>