I no longer beat myself up over such lapses in attention. Sure, I try to refocus when I notice that my attention has strayed, but I also realize that God wants to be a part of my entire life. Such inattention might also be God's way of trying to give me help in those areas which are certainly taking up a great deal of my focus. Instead of getting angry with myself, I try to offer up whatever I my thoughts had strayed to and then refocus again ... to varying degrees of success.
Today's readings deal with God recognizing His chosen. In the first reading, God makes His covenant with Abram. In the Gospel, God announces that Jesus is His chosen Son as Jesus transfigured before three of His disciples. The second reading focuses on God bringing a transformation to our own lives. None of this really ties to my inattention in church today other than the idea that God has chosen me despite all of my failings. Like Abram with his sacrifices and Peter with his tent suggestion, I try to meet God on my terms even though God is so far above them.