Right click works when you have the Move Tool selected, and you right click on the image window. It shows the layer under the cursor. So in my example, although I have the Blue Ellipse layer selected, right clicking with the cursor over the Green Square showed that layer's name in the pop up window.
Does that answer your question?