## CinnamonWindowTracker CinnamonWindowTracker — Associate windows with applications |

## Functions

CinnamonWindowTracker * | cinnamon_window_tracker_get_default ()
CinnamonApp * | cinnamon_window_tracker_get_window_app ()
CinnamonApp * | cinnamon_window_tracker_get_app_from_pid ()
gboolean | cinnamon_window_tracker_is_window_interesting ()
GSList * | cinnamon_window_tracker_get_startup_sequences ()
const char * | cinnamon_startup_sequence_get_id ()
CinnamonApp * | cinnamon_startup_sequence_get_app ()
const char * | cinnamon_startup_sequence_get_name ()
gboolean | cinnamon_startup_sequence_get_completed ()
ClutterActor * | cinnamon_startup_sequence_create_icon ()

## Properties

CinnamonApp * | focus-app | Read

## Signals

void | startup-sequence-changed | Run Last
void | tracked-windows-changed | Run Last

## Object Hierarchy

        GBoxed
        ╰── CinnamonStartupSequence
        GObject
        ╰── CinnamonWindowTracker

## 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

### cinnamon_window_tracker_get_default ()

    CinnamonWindowTracker *
    cinnamon_window_tracker_get_default (void);

#### Returns

The global CinnamonWindowTracker instance.

[transfer none]

### cinnamon_window_tracker_get_window_app ()

    CinnamonApp *
    cinnamon_window_tracker_get_window_app
                                   (CinnamonWindowTracker *tracker,
                                    MetaWindow *metawin);

#### Parameters

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

#### Returns

Application associated with window.

[transfer full]

### cinnamon_window_tracker_get_app_from_pid ()

    CinnamonApp *
    cinnamon_window_tracker_get_app_from_pid
                                   (CinnamonWindowTracker *tracker,
                                    int pid);

Look up the application corresponding to a process.

#### Parameters

pid | A Unix process identifier |

#### Returns

A CinnamonApp, or `NULL` if none.

[transfer none]

### cinnamon_window_tracker_is_window_interesting ()

    gboolean
    cinnamon_window_tracker_is_window_interesting
                                   (MetaWindow *window);

The CinnamonWindowTracker associates certain kinds of windows with applications; however, others we don't want to appear in places where we want to give a list of windows for an application, such as the alt-tab dialog.

An example of a window we don't want to show is the root desktop window. We skip all override-redirect types, and also exclude other window types like tooltip explicitly, though generally most of these should be override-redirect.

#### Returns

`TRUE` iff a window is "interesting"

### cinnamon_window_tracker_get_startup_sequences ()

    GSList *
    cinnamon_window_tracker_get_startup_sequences
                                   (CinnamonWindowTracker *tracker);

#### Returns

Currently active startup sequences.

[transfer none][element-type CinnamonStartupSequence]

### cinnamon_startup_sequence_get_id ()

    const char *
    cinnamon_startup_sequence_get_id (CinnamonStartupSequence *sequence);

### cinnamon_startup_sequence_get_app ()

    CinnamonApp *
    cinnamon_startup_sequence_get_app (CinnamonStartupSequence *sequence);

#### Parameters

sequence | A CinnamonStartupSequence |

#### Returns

The application being launched, or `NULL` if unknown.

[transfer none]

### cinnamon_startup_sequence_get_name ()

    const char *
    cinnamon_startup_sequence_get_name (CinnamonStartupSequence *sequence);

### cinnamon_startup_sequence_get_completed ()

    gboolean
    cinnamon_startup_sequence_get_completed
                                   (CinnamonStartupSequence *sequence);

### cinnamon_startup_sequence_create_icon ()

    ClutterActor *
    cinnamon_startup_sequence_create_icon (CinnamonStartupSequence *sequence,
                                           guint size);

#### Parameters

size | Size in pixels of icon |

#### Returns

A new ClutterTexture containing an icon for the sequence.

[transfer none]

## Types and Values

## Property Details

### The `“focus-app”` property

      “focus-app”                CinnamonApp *

Focused application.

Flags: Read

## Signal Details

### The `“startup-sequence-changed”` signal

    void
    user_function (CinnamonWindowTracker   *cinnamonwindowtracker,
                   CinnamonStartupSequence *arg1,
                   gpointer                 user_data)

Flags: Run Last

### The `“tracked-windows-changed”` signal

    void
    user_function (CinnamonWindowTracker *cinnamonwindowtracker,
                   gpointer               user_data)

Flags: Run Last