Fix bug where dragging doesn't change the grid types

This is caused by incorrect boundaries of the grids. The width of the border
line is added to the grid size, thus, the region needs not account for the
border width.