xrandr generated event

Adam Jackson ajax at nwnk.net
Mon Jan 11 07:12:16 PST 2010


On Sat, 2010-01-09 at 11:42 +0100, Nokan Emiro wrote:

> Could someone please tell me what event should an X client
> subscribe and handle to update it's knowledge on screen size
> (width and height is saved at client startup from DisplayWidth()
> and DisplayHeight())?
> 
> If a user switches into an other resolution (for emaple form 1024x768
> into 800x600 with:
> 
>      $ xrandr --output VGA --mode 800x600
> 
> ), my X client's widht and height needs to be modified somehow,
> and I hope XSelectInput() + XNextEvent() can notify me on these
> resolution changes...

You can either select for ConfigureNotify on the root window, or for
RRScreenChangeNotify using XRRSelectInput().

http://google.com/codesearch?q=XRRSelectInput

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20100111/33e6ce60/attachment.pgp>


More information about the xorg mailing list