helloSystem / launch

Command line tool to launch applications, will search for .app bundles and .AppDir directories in various directories, and will show launch errors in the GUI
BSD 2-Clause "Simplified" License
16 stars 6 forks source link

Start showing a bouncing icon in the Dock #2

Open probonopd opened 3 years ago

probonopd commented 3 years ago

Start showing an animated icon in the Dock from the time launch is about to start the application onwards.

The Dock is then responsible for stopping the animated icon and show the regular application icon in case the app has launched, or just remove the animated icon altogether after a timeout, or in case the application exits.

Is there already a protocol/standard for this?

probonopd commented 3 years ago

https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/

Still at 0.1 after 18 years! https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt

It uses "X messages", a mechanism for sending text strings between X clients without the need for D-Bus. Interesting!

In the language of that spec, the launch command is called a "Launcher".

The startup notification protocol involves sending X messages with the message_type atom _NET_STARTUP_INFO_BEGIN/_NET_STARTUP_INFO to the root window.

probonopd commented 3 years ago

Possibly relevant code:

https://github.com/qtinsider/qt5-meego-platform-plugin/blob/ceb11993600bfcf7aecd0e5bc5e645e26556cb1f/mplatformscreen.cpp#L315-L339

probonopd commented 3 years ago

There is even a whole library for it: https://github.com/freedesktop/startup-notification