added small sleep when maximizing

This is to give time for the context menu to be
started, as sometimes it shows up late.