procedure TForm1.PopupMenu1Popup(Sender: TObject);
begin
Label1.Caption := PopupMenu1.PopupComponent.Name;
end;

だから

if PopupMenu1.PopupComponent = Panel1 then

とかでOK