Introduce a public Introspect API
Feature summary
I'd like to get the current active application in the foreground. I don't need to know the application's name, but the application identifier should be stable. (expanded more below)
AFAIK the previous methods of grabbing the application-id
from either the Eval
or Introspect
method no longer works without an unsafe context: #3943 (closed)
How would you like it to work
I'd like GNOME Shell (or maybe in the xdg-desktop-portal
?) to provide a new DBus API which allows for 'Safe Introspection'.
The key idea is to provide as much information as possible about running applications, without compromising on user's privacy.
Introspect
API:
Option 1: Expose the current Pros: Easy to implement. Cons: Might compromise user privacy because too much information might be exposed.
Option 2: Create a new public Introspect API:
This will strip out potentially sensitive information, such as the window title. I have created a proof-of-concept extension here which strips out the title text from the GetWindows
API.
Pros: Official, public introspection API. Cons: Might not be able to expose much information, as we don't have per-app allow-listing.
Option 3: Allow a per-app allowlisting.
As I understand it, this work is not funded yet, and might require significant effort to implement. I think this is the ultimate direction that we should aim for, but shouldn't block other easier implementations if possible.
I'm fairly new to the whole GNOME ecosystem so feel free to let me know if my ideas don't make sense.