Without getting into the driver, we don't get the right NumScreen for
TwinView setup (it would always be one).  However, we could fix it by
checking TwinView in wacomcpl-exec.

So, without updating wacomcpl-exec, this patch doesn't fulfil the
backward compatibility promise for Nvidia's TwiView setup in wacomcpl.

Ping

On Sun, Jan 10, 2010 at 6:36 PM, Peter Hutterer
<[email protected]> wrote:
> This is for backwards-compatibility with wacomcpl only, it simply returns
> the screen count as seen by X clients.
>
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
> Temporary stopgap measure to make wacomcpl at least start.
>
>  tools/xsetwacom.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
> index f7817b2..6e641d5 100644
> --- a/tools/xsetwacom.c
> +++ b/tools/xsetwacom.c
> @@ -78,6 +78,7 @@ static void get_rotate(Display *dpy, XDevice *dev, param_t 
> *param, int argc, cha
>  static void set_twinview(Display *dpy, XDevice *dev, param_t *param, int 
> argc, char **argv);
>  static void get_twinview(Display *dpy, XDevice *dev, param_t *param, int 
> argc, char **argv);
>  static void set_xydefault(Display *dpy, XDevice *dev, param_t *param, int 
> argc, char **argv);
> +static void get_num_screens(Display *dpy, XDevice *dev, param_t *param, int 
> argc, char **argv);
>  static void get_all(Display *dpy, XDevice *dev, param_t *param, int argc, 
> char **argv);
>  static void get_param(Display *dpy, XDevice *dev, param_t *param, int argc, 
> char **argv);
>  static void not_implemented(Display *dpy, XDevice *dev, param_t *param, int 
> argc, char **argv)
> @@ -807,8 +808,8 @@ static param_t parameters[] =
>        {
>                .name = "NumScreen",
>                .desc = "Returns number of screens configured for the desktop. 
> ",
> -               .set_func = not_implemented,
> -               .get_func = not_implemented,
> +               .get_func = get_num_screens,
> +               .prop_flags = PROP_FLAG_READONLY
>        },
>        {
>                .name = "XScaling",
> @@ -1835,6 +1836,11 @@ static void get_button(Display *dpy, XDevice *dev, 
> param_t *param, int argc,
>        XFlush(dpy);
>  }
>
> +static void get_num_screens(Display *dpy, XDevice *dev, param_t *param, int 
> argc, char **argv)
> +{
> +       print_value(param, "%d", ScreenCount(dpy));
> +}
> +
>  static void get_all(Display *dpy, XDevice *dev, param_t *param, int argc, 
> char **argv)
>  {
>        param_t *p = parameters;
> --
> 1.6.6
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to