Regression: make image viewer full screen again

Bug introduced in 463eaaa8a1f37849b78333d425e87cc26a976561.
This also fixes bug 54036 in a cleaner way than the aforementioned
commit.

Bug: 54036
Change-Id: I8a16cffa3890b76b47b7d9cf12e4a58adf5a6cbb
Merge "Regression: make image viewer full screen again"