That's called the "expanded edit mode".
To exit expanded edit mode and return to the previous window layout; perform any of the following actions:
* Choose Edit > Select > Exit Expanded Edit Mode.
* Press 5 on the numeric keypad.
* Double-click the event edge.
* Press Esc.
Or you have Expanded track layers.
If you do not see any red bracket to indicate an event edge and the tricks above do not work, try right-clicking the track header and deselect Expand Track Layers. And double-clicking the vertical scroll bar will mimimize/restore the track heights.