[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: How to get each monitor's geometry with xlib when there is more =?iso-8859-1?Q?than_one_screen_=
From: Thomas_Lübking <thomas.luebking () gmail ! com>
Date: 2015-09-29 11:08:15
Message-ID: 5442d513-430f-43dd-a591-7ef0b997b5da () gmail ! com
[Download RAW message or body]
On Dienstag, 29. September 2015 10:56:33 CEST, Hacksign wrote:
> My monitor configuration is listed at the end of this email post.
> My problem:
> can not get each monitor's width & height widh xlib.
> here is my code:
"monitor" = "output" != "screen" in X11 - nevertheless you're looking for
XRRScreenSize *XRRSizes(Display *dpy,
int screen, int *nsizes);
Pass it the values you have and a reference to "int nsizes" and get back a list of
typedef struct {
int width, height;
int mwidth, mheight;
} XRRScreenSize;
don't forget to free that.
See http://linux.die.net/man/3/xrrscreenconfig
Notice that this only works as expected w/ the xrandr extension available. Otherwise \
you'll (afair) always have one screen with the combined size of the root window.
Cheers,
Thomas
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic