Added code to hide the borders according to placement of the window (maximized, halfscreen, etc...).