added display awareness

added display awareness and window resize event handler.