helloSystem / Dock

Application dock
GNU General Public License v3.0
18 stars 13 forks source link

Show application icon while the application is being started #2

Open probonopd opened 3 years ago

probonopd commented 3 years ago

When a GUI application is not started from a desktop file but e.g., from a shell script (or from an .app bundle or .AppDir directory), then the application icon is not shown correctly in the Dock.

Also, the icon is shown in the Dock only after the application has finished loading and is showing a window. For large applications it can take a few seconds until the application is fully loaded. Doring this time, no icon is shown in the Dock.

I would like a behavior more like the Mac:

For this we need:

  1. A way to tell the Dock that an application launch has begun
  2. A way to tell the Dock the application icon to be used during launching
  3. W way for the Dock to know when the launching of the application is finished

For example like this:

For 1. and 2. Whenever something (e.g., the file manager, a shell script, an .app bundle, etc.) launches an application, then it sends a D-Bus message to the Dock, containing the process ID (PID) and an URI (file:///) to the icon file For 3. the Dock can look up _NET_WM_PID for each new window. If it matches the PID above, then stop the launch icon animation and show the non-animated icon instead

Or is there a simpler way to achieve this without the need for D-Bus?

Upstream ticket: https://github.com/cyberos/cyber-dock/issues/9