Refactor the native window api return codes and simplify the window use

Test: build, flash and boot
Change-Id: Ie1a5c0ed884bd30d0df07962c8abc916ba15bc6e
1 file changed