Only grab the mouse input if the display is active (window is focused)

Signed-off-by: Steven Downer <grinch@outlook.com>