A press in the Composition panel always acted on the topmost layer
under the pointer, so a selected layer could not be dragged where
another layer covered it: the press selected the layer in front. As in
After Effects, a selected layer under the pointer now comes first: it
stays selected and a drag moves it. With no selected layer there the
topmost layer is picked as before, and Shift still toggles the topmost
one. The context menu's list of layers under the pointer shares the
same hit test.
Test: viewer_press_prefers_a_selected_layer_under_the_pointer
(ui_viewer).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>