On Fri, May 14, 2010 at 2:16 AM, Peter Hutterer <[email protected]> wrote: > On Thu, May 13, 2010 at 10:30:17PM +0300, yoni dana wrote: >> Thanks for the reply. I am writing an x11 input driver. I have a >> looked at some x11 input driver >> and didn't see the XRRScreenChangeNotify function, is there another way >> i can detect screen rotation so i can swap between X and Y coordinate >> thank you > > you need to write an X client (== application) to handle this situation. > input drivers don't have access to these events directly, so you won't find > any code in evdev/synaptics/... do handle this. > > the order of events is > user triggers rotation > X server rotates > X server sends RRNotify events > your client receives event > your client triggers input rotation > input driver rotates. > > one question I have to ask you though - why are you writing an input driver? > there's a good chance that the device may be supported by evdev (of if not, > should be supported in the kernel instead). That's if you're on linux > anyway. > > Cheers, > Peter > >> i have look at the synaptic and evdev driver and didn't see >> XRRScreenChangeNotify >> function, is there another wahy >> On Wed, May 12, 2010 at 12:52 PM, Éric Piel <[email protected]> wrote: >> > Op 12-05-10 07:39, yoni dana schreef: >> >> Hi >> >> i have implemented and X11 input driver, >> >> i need to add support to screen rotation, >> >> My questions is >> >> How can i detect screen rotation occurred >> >> (For Example i use xrandr -o left ) >> > I think you can do this in a X client which listens to the >> > XRRScreenChangeNotify event on the root window. See the Xrandr(3) man >> > page for more info. Then, your client can request a change of >> > orientation to the input via an input property. >> > >> > Eric >> > >
Hi Thanks Peter for the reply, i have wrote a kernel driver, i will check if i can user evdev as an X11 input driver. My question if how can i triger the input driver to roate. which signal / command i have to send to the X11. _______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg
