shell-window-tracker: Shell Reference Manual

## shell-window-tracker shell-window-tracker — Associate windows with applications |

## Functions

ShellWindowTracker * | shell_window_tracker_get_default ()
ShellApp * | shell_window_tracker_get_window_app ()
ShellApp * | shell_window_tracker_get_app_from_pid ()
GSList * | shell_window_tracker_get_startup_sequences ()

## Types and Values

#define | SHELL_TYPE_WINDOW_TRACKER
| ShellWindowTracker

## Description

Maintains a mapping from windows to applications (.desktop file ids). It currently implements this with some heuristics on the WM_CLASS X11 property (and some static override regexps); in the future, we want to have it also track through startup-notification.

## Functions

### shell_window_tracker_get_default ()

    ShellWindowTracker *
    shell_window_tracker_get_default (void);

#### Returns

The global ShellWindowTracker instance.

[transfer none]

### shell_window_tracker_get_window_app ()

    ShellApp *
    shell_window_tracker_get_window_app (ShellWindowTracker *tracker,
                                         MetaWindow *metawin);

#### Parameters

tracker | An app monitor instance |
metawin | A MetaWindow |

#### Returns

Application associated with window.

[transfer full]

### shell_window_tracker_get_app_from_pid ()

    ShellApp *
    shell_window_tracker_get_app_from_pid (ShellWindowTracker *tracker,
                                           int pid);

Look up the application corresponding to a process.

#### Parameters

tracker | A ShellAppSystem |
pid | A Unix process identifier |

#### Returns

A ShellApp, or `NULL` if none.

[transfer none]

### shell_window_tracker_get_startup_sequences ()

    GSList *
    shell_window_tracker_get_startup_sequences
                                   (ShellWindowTracker *tracker);

#### Returns

Currently active startup sequences.

[transfer none][element-type MetaStartupSequence]

## Types and Values

### SHELL_TYPE_WINDOW_TRACKER

    #define SHELL_TYPE_WINDOW_TRACKER (shell_window_tracker_get_type ())

### ShellWindowTracker

    typedef struct _ShellWindowTracker ShellWindowTracker;