From: Mike Scott on
I'm trying to port properly to ubuntu an XP-based perl/Tk routine. Among
other things, this locates a second monitor and creates a full-screen
window within it. The idea eventually is to have a projection screen and
a separate control monitor.

The existing XP code is nasty enough - it simply scans the coordinate
space round the primary monitor, calling the win32 API to return the
monitor nearest the scan point, and returning the coordinates of the
first monitor found that isn't the primary monitor. A horrid hack, but
it works well enough for me ......

Anyway, I've now got ubuntu 10.04 running on my laptop, with a secondary
screen connected. That's working fine. However, it seems that while X11
treats the secondary monitor in generally the same way as XP - extending
the coordinate space to contain both monitors - there's no way that I
can find of returning properties of either screen individually, and
they're treated together treated as display #0. In particular, xlib
returns the overall width and height.

So, given two (or more!) monitors, how do I determine their positions in
the overall coordinate space, and their sizes? Or is there a better way
of tackling this under X11?

Thanks for any pointers!

--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
From: Chris Eilbeck on
Mike Scott <usenet.12(a)spam.stopper.scottsonline.org.uk> writes:

> So, given two (or more!) monitors, how do I determine their positions
> in the overall coordinate space, and their sizes? Or is there a better
> way of tackling this under X11?

"xrandr -q" looks like it'll give you the info you need.

Chris
--
Chris Eilbeck
From: Mike Scott on
Chris Eilbeck wrote:
> Mike Scott <usenet.12(a)spam.stopper.scottsonline.org.uk> writes:
>
>> So, given two (or more!) monitors, how do I determine their positions
>> in the overall coordinate space, and their sizes? Or is there a better
>> way of tackling this under X11?
>
> "xrandr -q" looks like it'll give you the info you need.
>
> Chris

Ah, bingo. Thanks. All I need plus a bit more. Looks like the easy way
will be to run this from my perl code and parse the output; good enough
if about as inelegant as my XP code :-)

--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
 | 
Pages: 1
Prev: Fabiatech FX5624
Next: USB problem