xrectsel is a small program that tells you the geometry of a rectangular screen region which you have selected by dragging the mouse / pointer.