Make it so that dragging by the borders resizes the window.
Best way would likely be to make this and the movement code one and the same, since this code will already have to deal with both movement and resizing. Maybe create an enum of different resizing modes (eg: top edge, bottom right corner, move) and have the pointer motion handler resize/move the window as appropriate based on the mode. Or possibly have a mask instead, tracking which edges to move.
Make it so that dragging by the borders resizes the window. Best way would likely be to make this and the movement code one and the same, since this code will already have to deal with both movement and resizing. Maybe create an enum of different resizing modes (eg: top edge, bottom right corner, move) and have the pointer motion handler resize/move the window as appropriate based on the mode. Or possibly have a mask instead, tracking which edges to move.