Peter,

Though it looks like already obsolete, I've reposted the patch following - 
hopefuly - the guidelines...

Bruno

Le jeudi, février 24, 2011 06:27:31, vous avez écrit :
> On Sun, Feb 20, 2011 at 02:21:52PM +0100, Bruno Vasselle wrote:
> > I've had a problem with the "Bamboo Touch and Pen" on my laptop : the
> > pointer sticks to right edge of the screen and never responds to changes
> > in horizontal direction.  The X log shows absurd negative X dimensions
> > in messages that state about "top X=.... top Y=... bottom X=... bottom
> > Y=... resol X=... resol Y=...".
> > 
> > It appears that the driver faces a division by zero when trying to deal
> > with the "KeepShape" option on that computer. The fields 
> > "priv->maxWidth" and "priv->maxHeight" are both set to 0 - don't ask me
> > why - making it impossible to assess the screen ratio.
> > 
> > I've patched (attached) to detect and disable KeepShape in the situation.
> > This does not solve the problem, which is somewhere else, but makes
> > however the driver more robust, removing an option when it cannot
> > possibly deal with.
> > 
> > Bruno
> > 
> > NB
> > 
> > Augmenting the debuging level in X configuration (50-wacom.conf: Option
> > "DebugLevel" "100"), without any modification to the source,  shows
> > something
> > 
> > like :
> >    screenRatio = -nan, tabletRatio = 1.6
> > 
> > diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> > index e8c4710..5cdb300 100644
> > --- a/src/xf86Wacom.c
> > +++ b/src/xf86Wacom.c
> > @@ -116,6 +116,14 @@ static int wcmInitArea(InputInfoPtr pInfo)
> > 
> >     /* Maintain aspect ratio to the whole desktop
> >     
> >      * May need to consider a specific screen in multimonitor settings
> >      */
> > 
> > +   if ((priv->flags & KEEP_SHAPE_FLAG) &&
> > +       (priv->maxHeight == 0)) /* safeguard in case screen ratio is
> > unknown */ +        {
> > +           xf86Msg(X_WARNING,
> > +                   "%s: disabling option \"KeepShape\" as screen shape is 
> > not
> > accessible\n", +                    pInfo->name);
> > +           priv->flags &= ~KEEP_SHAPE_FLAG;
> > +   }
> > 
> >     if (priv->flags & KEEP_SHAPE_FLAG)
> >     {
> 
> Thanks, looks good. can you please send this as signed-off, git formatted
> patch so we can easily apply this patch? thanks.
> https://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Submittin
> g_Patches
> 
> Cheers,
>   Peter

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to