# galf **Repository Path**: mirrors_chromium_gitlab_gnome/galf ## Basic Information - **Project Name**: galf - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-09 - **Last Updated**: 2025-11-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Galf is the GNOME implementation of a new Application Launch Feedback mechanism. This mechanism requires a toolkit to check if the environmental variable DESKTOP_LAUNCH_ID is set, and, if it is, then the property _NET_WM_LAUNCH_ID is set on the toplevel window of an application. The value of the _NET_WM_LAUNCH_ID property is set to the value of the DESKTOP_LAUNCH_ID variable. HOW GALF WORKS: Feedback is controlled by an ORBit server, called galf-server, and an ORBit client, called galf. OAF is used to activate the server. (NB: having trouble with OAF implementation - any suggestions would be appreciated. I have included a #def IOR to bypass OAF and use a simple ior file for demo purposes until OAF problems resolved.) Galf acts as a binary wrapper around the application to be launched. It sets a new environmental variable, DESKTOP_LAUNCH_ID, with a unique value. The 2.0 gtk+ library will be updated so that, if the DESKTOP_LAUNCH_ID environmental variable is set, then _NET_WM_LAUNCH_ID property is set on the toplevel window of the application to be launched. The value of DESKTOP_LAUNCH_ID is assigned as the value of this property. Galf also sets a compliance flag to indicate whether the toolkit is compliant with DESKTOP_LAUNCH_ID. This flag is a parameter to the remote methods used. At present compliance is determined by whether the application has a .desktop file. This is inadequate, a better solution would be to check for a flag/field within the application's .desktop file. Galf then invokes a remote method to start the feedback display for the application to be launched. Galf examines the _WIN_CLIENT_LIST property on the root window in order to extract a list of currently mapped windows. It passes this list of currently mapped windows as one of the arguments to a oneway remote method, called monitor_new_windows(). This remote method then monitors the _WIN_CLIENT_LIST property for any newly mapped windows. Galf then forks and execs the application to be launched. Once the monitor_new_windows() method detects the creation of a new window, it examines the value of the compliance flag: 1. If the application is compliant, it checks to see if the _NET_WM_LAUNCH_ID property has been set and has the correct value. If it has, then the feedback display is stopped. If not then monitor_new_windows() continues to monitor for new windows. 2. If the compliance flag is not set, the application may or may not be compliant with _NET_WM_LAUNCH_ID (ie it may be possible to have an application using a compliant toolkit, but which doesn't have a correct .desktop file ). For this reason a check is done to see if _NET_WM_LAUNCH_ID has been set. If the property is set then proceed as above in point no. 1. If the new window does not have this property then the feedback display is stopped (similar to Xalf's mappingmode solution). NOTE: included a hack for compliant applications in monitor_new_windows() to deal with possible situation where gdk has failed to set the _NET_WM_LAUNCH_PID property. Set a default timeout for compliant applications so that feedback is stopped after 30 secs. - galf takes two extra options: 1) -t title (wording to be displayed in feedback, default is binary name of application to be launched) 2) -n nogalf (launch application without feedback) - The feedback to be displayed is managed via plugins. At present plugins are located via gnome-config, however this will be updated to integrate with gconf. One default plugin is included at present, this is the tasklist window (as adapted from the Xalf code.) WRITING COMPLIANT PLUGINS: Plugins are located at ./plugins/ Each plugin is described by a PlugInfo struct (as defined in src/plugin.h). All plugins must have the function: gint init_plugin (PluginInfo *). This function should set the following PluginInfo elements: - plugin_name (name of the plugin) - desc (description of the plugin) - author (name of the plugin author) The PluginInfo passed to the init_plugin function will have the element launched_app_name set with the name of the application being launched. The function will then make a call to create the feedback display. If successful, init_plugin will return PLUGIN_OK, otherwise it will return PLUGIN_ERROR. NB: if the feedback display is in the form of a visual, then its WM_CLASS property must be set with the value of "galf". Eg. in the default task_window feedback display plugin, the WM_CLASS is set as follows: gtk_window_set_wmclass (GTK_WINDOW(window), "galf", "galf"); This is necessary for the mechanism for stopping feedback display for non-compliant applications. SEE ./plugins/task_window/task_window.c for an example of how to write a compliant plugin.