Respect PrefersNonDefaultGpu desktop entry key
Use cases
Allow applications telling the OS that they would prefer using the discrete GPU
From a user:
In most of the time I open programs by some file (like thisdraw.kra) and It's really, really annoying doing a lot of effort like open krita with right click, select dgpu mode, search for the thisdraw.kra and so on...
Desired behavior
When an application that has PrefersNonDefaultGPU=true
set in its desktop entry is launched through an associated file, it is offloaded to the dedicated GPU.
Benefits of the solution
Parity with gnome-shell: gnome-shell!1226 (merged).
Possible drawbacks
Ref: this comment from @hadess
Edited by Bastien Nocera