On Wed, Aug 10, 2011 at 3:44 PM, Peter Hutterer <peter.hutte...@who-t.net> wrote: > On Tue, Aug 09, 2011 at 06:05:00PM -0700, Jason Gerecke wrote: >> I've been recently trying to resurrect the DisplayToggle button >> command without much success. Most of the data I need access to (e.g. >> the contents of the coordinate transformation matrix) are only >> accessible with a Display object. I quickly learned that calling >> XOpenDisplay from within the driver is a recipe for disaster, and >> haven't had any luck finding functions that work without a Display. I >> also took at the old TwinView code for inspiration, but couldn't track >> down how the driver wound up with the necessary info... > > write a client (or integrate into an existing one) that catches the assigned > button and reassigns the matrix. This way you also end up being > configurable (toggle left-to-right? toggle right-to-left? etc) >
I was afraid of being told that. I suppose DisplayToggle makes sense as a client application since it wouldn't be doing anything particularly specific to our driver. I imagine you could probably even hack together a stateless bash script that analyzes the output of the xinput and xrandr commands to do it in a pinch... On the downside, not having DisplayToggle in the driver does make implementing a 'MatchAspectRatio' option uglier... I was really looking forward to not needing to touch the 'Area' property :) > That aside, note that any property is accessible from within the driver > through XIChangeDeviceProperty. You just need the atom name (MakeAtom()) and > the rest is pretty much like the property init code in wcmXCommand.c > of course, you don't have access to the screen dimensions in the driver, so > you'd have to guess the matrix values. > Good to know. I figured with the name 'MakeAtom' that it would be creating new atoms on the server, not also giving me references to existing ones. I'll have to keep that in mind. Jason --- Day xee-nee-svsh duu-'ushtlh-ts'it; nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it. Huu-chan xuu naa~-gha. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel