Skip to content

X11 device windows are spawned with empty WM_NAME property

4 messages · Drew Frank, Brian Ripley, Peter Dalgaard

#
On Jun 17, 2011, at 01:53 , Drew Frank wrote:

            
A well-tested patch might be considered, but beware of the demons...

Notice that you can actually set the title via X11(title="Foo's bar"). If you do that, it won't display the device number. So (a) you wouldn't want to destroy that feature, and (b) how does the code that inserts the "Device 2" bit know that it can do so? By checking for an empty title? (Yup).
 
I notice that the initial title string could contain formatting characters, so possibly, what you really want to do is to default it to "R Graphics: Device %d"). Something of the sort is already happening with the quartz() device.

  
    
#
On Fri, 17 Jun 2011, peter dalgaard wrote:

            
That is what the window class property is for .... X11 windows can 
(and R allows) have different names chosen by the user.
Yes, no.
In which version of R?  The codebase for the development version is 
quite different from that in the 2.13.x series ....

  
    
#
On Jun 17, 2011, at 15:32 , Prof Brian Ripley wrote:
Well, "yes, maybe", I'd say. If the WM insists on looking at the title, it makes some pragmatic sense for the user to set it to a generic name that the WM can recognize.

However, on revisiting this, the obvious fix/workaround is just to set 

X11.options(title="R Graphics: Device %d")

and the user can do this in his/her startup files. No need to inflict it on every user with any WM.