Getting the XRROutputInfo for a window xid

Kai-Uwe Behrmann ku.b at gmx.de
Sun Jan 10 03:15:20 PST 2010


Am 09.01.10, 09:31 -0000 schrieb Richard Hughes:
> gnome-color-manager currently manages the per-session display
> correction. It sets up the gamma ramp and sets an atom called
> _ICC_PROFILE on each _output_ as you should have different vcgt
> profiles for each physical monitor.  We currently also set the primary
> output profile as an atom on the _screen_ for compatibility.
>
> Now, at the moment applications like GIMP check the per-screen
> _ICC_PROFILE and use that as the output profile. This doesn't work
> very well when there is more than one output, as GIMP could be using
> the "wrong" ICC profile for the output it's currently being displayed
> on. It can get more pathological, where one window could be spanning
> more than one output, although this isn't the common case.
>
> For experimenting with this idea, I would like to be able to get the
> xrandr-output from the window xid. I've been told by a few people that
> the only way to do this would be to construct the display space (where
> the monitors are positioned) and then work out the window co-ordinates
> and try to fit one to the other. If there is any better ideas you've
> got, or any code to do this, I would be very grateful. Thanks.
>
> Richard.

I suspect a unique output per window is slightly illusionary. A window can 
easily reside on multiple monitors at once, in a according setup. So would 
users really be satisfied by seeing a switching colour correction at a 
most coverage rule?

Oyranos' imaging framework looks at the _ICC_PROFILE(_xxx) atom(s) on 
the root window in order to colour correct user content on a per monitor 
basis to account for multi monitor setups.
It needs to know, which monitor/profile covers which region. How does 
the monitor/profile regions fits the user content? This involves to know 
where the user content is intented to be displayed on the screen. One 
disadvantage with this "intented to be displayed on the screen" is that 
modern compositing window managers might decide to deform the window. 
Thus the window coordinates become meaningless including all projected 
monitor regions. To overcome that limitation, we initiated at OpenICC a 
project for colour correction near the server. That work is available as 
compiz plug-in.
However in many cases client side colour correction should be no problem.

The per monitor colour correction is as well demonstrated in the 
image_display example viewer in Oyranos git. The Oyranos monitor device 
naming is designed to correlate with Xinerama numbering. This should allow 
to match a monitor ICC profile with a Xinerama monitor region.


kind regards
Kai-Uwe Behrmann
-- 
developing for colour management 
www.behrmann.name + www.oyranos.org





More information about the xorg-devel mailing list