From ripley at stats.ox.ac.uk  Tue Feb  2 07:11:52 2010
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 2 Feb 2010 06:11:52 +0000 (GMT)
Subject: [Rd] R's X11 Device Properties
In-Reply-To: <Pine.GSO.4.64.1002011757140.9670@tadpole.ccbr.umn.edu>
References: <Pine.GSO.4.64.1002011757140.9670@tadpole.ccbr.umn.edu>
Message-ID: <alpine.LFD.2.00.1002020558480.10850@gannet.stats.ox.ac.uk>

On Mon, 1 Feb 2010, Erik Iverson wrote:

> Hello,
>
> This is an issue that is at the interface of R, X, and my window manager 
> (either icewm or openbox, both latest versions).  I am running R 2.10.1 on 
> Ubuntu 9.10.
>
> My goal: When an X11 device is started in R (e.g., by simply calling plot), I 
> would like for the resulting window to be in the "always on top" state, and 
> for focus not to switch to it.
>
> Configuring this behavior is handled through the window manager, but both of 
> the above referenced window managers require that the first element of 
> window's WM_CLASS property, second element of window's WM_CLASS property, or 
> the window's WM_WINDOW_ROLE property be set so that the right window can be 
> matched.
>
> If I start R, type
>
>> plot(1,1)
>
> and then run "xprop" (command line program to inspect X window properties) on 
> the resulting X11 window, none of these properties show up in the resulting 
> output.
>
> Is there any hope for this to change?  I did notice in ?X11 that "The 
> standard X11 resource geometry can be used to specify the window position 
> and/or size, but will be overridden by values specified as arguments or 
> non-NA defaults set in X11.options. The class looked for is R_x11."

But the WM_CLASS is not set.

http://tronche.com/gui/x/xlib/ICC/client-to-window-manager/wm-class.html

shows how you could prepare a patch.  As so often with window manager 
issues, we need someone who uses that WM and wants the feature to try 
it out.

> This "R_x11" class works fine for setting the geometry in .Xresources, but it 
> does not seem to be the same "class" as WM_CLASS referenced above.

It is not.

> Unfortunately, this is about as far as my knowledge of X goes, so hopefully 
> this makes sense. If anyone has any pointers, they would be welcome. Thank 
> you!
>
> Best Regards,
> Erik Iverson
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] R's X11 Device Properties
Prof Brian Ripley