CinnamonWindowTracker

CinnamonWindowTracker — Associate windows with applications

Functions

Properties

Signals

void startup-sequence-changed Run Last
void window-app-changed Run Last

Object Hierarchy

    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
                               (CinnamonWindowTracker *tracker,
                                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.

Parameters

tracker

the CinnamonWindowTracker

 

window

a MetaWindow

 

Returns

TRUE if 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 MetaStartupSequence]

Property Details

The “focus-app” property

  “focus-app”                CinnamonApp *

Focused application.

Owner: CinnamonWindowTracker

Flags: Read

Signal Details

The “startup-sequence-changed” signal

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

Flags: Run Last


The “window-app-changed” signal

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

Flags: Run Last