Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-07-09 05:02:20

infinite
Member
Registered: 2015-11-03
Posts: 91

[Solved]xfce4-terminal , parameter "role"

Hi,

http://docs.xfce.org/apps/terminal/command-line#window_options wrote:

--role=role
    Sets the window role of the last-specified window to role. Applies to only one window and can be specified once for each window you create from the command line. The role is a unique identifier for the window to be used when restoring a session.

Since its a window option , is it relative to X window system ?
Obviously no because nothing about it in the man page .


So, what's this "role" option , where does it come from ?

Last edited by infinite (2016-07-10 15:23:39)

Offline

#2 2016-07-09 12:28:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,017

Re: [Solved]xfce4-terminal , parameter "role"

It's an implementation of GTK's window role functionality. From the link:

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

So basically, during session restore, if you are restoring windows, the role can help uniquely identify the particular instance of xfce4-terminal and allow the window manager to restore its position on the screen. If you give your terminals unique titles, then the role is not necessary.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2016-07-09 12:59:41

infinite
Member
Registered: 2015-11-03
Posts: 91

Re: [Solved]xfce4-terminal , parameter "role"

So , role can be any value type char instead of "toolbox" ?

Offline

#4 2016-07-09 18:19:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,017

Re: [Solved]xfce4-terminal , parameter "role"

Yes. Whatever gets added after the parameter is processed as a string.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB