Method

GtkWindowset_role

Declaration [src]

void
gtk_window_set_role (
  GtkWindow* window,
  const gchar* role
)

Description [src]

This function is only useful on X11, not with other GTK+ targets.

In combination with the window title, the window role allows a [window manager][gtk-X11-arch] to identify “the same” window when an application is restarted. So for example you might set the “toolbox” role on your app’s toolbox window, so that when the user restarts their session, the window manager can put the toolbox back in the same place.

If a window already has a unique title, you don’t need to set the role, since the WM can use the title to identify the window when restoring the session.

Sets propertyGtk.Window:role

Parameters

role

Type: const gchar*

Unique identifier for the window to be used when restoring a session.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.