Your question should be
Does it help my users to show a progress indicator inside my buttons?"I'll explain why.
There is no right answer to this but you highlight some context in your question
This is for a desktop app, if it matters and
The advantage is that the user always knows which command of a few is executing. Why are those two statements important?
You say a desktop app and it sounds like you expect certain assumptions to be drawn from that (e.g. that operations aren't limited by network speed maybe?). The reason I call this out is that you should be asking yourself, why is it important that this is a desktop app? Is it that operations complete quickly? Depending on the operation, but you should be clear about whether that is an expectation or assumption. E.g. Indexing the whole disk on a desktop app may take a long time, but viewing your profile on a web app may be quick, so you should be explicit about the use case of the button, because the context does matter to the answers.
You are right that the advantage is that the user knows which command is executing. But again you should be asking why. Is is that certain operations take time, and some others aren't possible when this is happening (so you're talking about disabling others)? Is it that several (potentially) concurrent operations are possible and it's important to know which is happening? (perhaps some aren't user initiated?).
In summary, you should be really clear about what is happening, and what the value is if providing the user feedback as to what is happening. Here's two examples:
- If the operation is
login and it's generally quick, you may want to show a logging in indicator but be aware that many times it's shown for <1 second (say) and it's a substitute for disabling the login button (or maybe in addition to?). In this context it's largely presentational and the impact of clicking twice are low, it might restart the login process but that's not the end of the world.
- However, if you're making a £10,000 payment, the way you respond to a click, and how you show processing might be massively different, you may want/need to disable buttons, a spinner might not be enough to let the user know something is happening etc.
TL;DR You should be thinking about what the button does, not what platform the app is deployed upon, and understanding the specific impact of failure/success of the operation on the user and the business, to find the best solution.