Partially correct. For sure a lot of it is getting attention, but they do care about the warmth. I've walked in to my office plenty of times to see my cat sitting on my laptop when I haven't even been in there for hours. She will even find the laptop and lay on it when it's in random places around the house. Reproduced with three different cats over the yeras. The warmth is definitely a cat magnet.
Noticed that in my absence, cats hang where I spend the most of my time when present. If for a few days I only come home to sleep I'll usually find them on my bed. If I work at my desk for a week, then the next days they'll be found on my chair. And so on.. A somewhat reliable habit indicator.
When my cats want warmth, they go on top of my desktop tower (or on my lap under the keyboard tray). If they're at the level of my desk, they're almost definitely angling for attention.
sometimes its scent too.