Miscellaneous Functions: Libwnck Reference Manual

## Miscellaneous Functions Miscellaneous Functions — other additional features. |

## Stability Level

Unstable, unless otherwise indicated

## Functions

void | wnck_set_client_type ()
void | wnck_shutdown ()

## Types and Values

enum | WnckClientType

## Description

These functions are utility functions providing some additional features to libwnck users.

## Functions

### wnck_set_client_type ()

    void
    wnck_set_client_type (WnckClientType ewmh_sourceindication_client_type);

`wnck_set_client_type` is deprecated and should not be used in newly-written code.

Sets the role of the libwnck user.

The default role is `WNCK_CLIENT_TYPE_APPLICATION`. Therefore, for applications providing some window management features, like pagers or tasklists, it is important to set the role to `WNCK_CLIENT_TYPE_PAGER` for libwnck to properly work.

This function should only be called once per program. Additional calls with the same client type will be silently ignored. An attempt to change the client type to a differnet value after it has already been set will be ignored and a critical warning will be logged.

#### Parameters

ewmh_sourceindication_client_type | a role for the client. |

Since: 2.14

### wnck_shutdown ()

    void
    wnck_shutdown (void);

Makes libwnck stop listening to events and tear down all resources from libwnck. This should be done if you are not going to need the state change notifications for an extended period of time, to avoid wakeups with every key and focus event.

After this, all pointers to Wnck object you might still hold are invalid.

Due to the fact that Wnck objects are all owned by libwnck, users of this API through introspection should be extremely careful: they must explicitly clear variables referencing objects before this call. Failure to do so might result in crashes.

Since: 3.4

## Types and Values

### enum WnckClientType

Type describing the role of the libwnck user.

#### Members

WNCK_CLIENT_TYPE_APPLICATION | the libwnck user is a normal application. |
WNCK_CLIENT_TYPE_PAGER | the libwnck user is an utility application dealing with window management, like pagers and taskbars. |

Since: 2.14