hide mouse cursor...

lantian ai ailantian at googlemail.com
Wed May 5 01:18:47 PDT 2010


Hi:
Do it in Window Manager , use Xfixes extension to hide the cursor.

Please refer to matchbox window manager
src/wm.c

void
wm_set_cursor_visibility(Wm *w, Bool visible)
{
#ifdef HAVE_XFIXES
 int major = 0, minor = 0, ev_base, err_base;

 if (XFixesQueryExtension (w->dpy, &ev_base, &err_base))
   XFixesQueryVersion (w->dpy, &major, &minor);

 dbg("Checking Xfixes, got %i.%i , ev (%i), err (%i)",
     major, minor, ev_base, err_base);

 if (major >= 4)
   {
     w->curs = XCreateFontCursor(w->dpy, XC_left_ptr);
     XDefineCursor(w->dpy, w->root, w->curs);

     if (visible)
   {
     w->config->no_cursor = False;
     misc_trap_xerrors();
     /* Appears to fire X error if not already hidden
          * but no way to query that ?
     */
     XFixesShowCursor (w->dpy, w->root);
     XSync(w->dpy, False);
     misc_untrap_xerrors();
   }
     else
   {
     XFixesHideCursor (w->dpy, w->root);
   }
   }


2010/5/5 balakrishnan <balakrishnan at e-consystems.com>:
> Hi,
>   I have used xserver-xorg-2_1.5.3-r4 package for my board. During
> touch input, I need to disable mouse cursor. How can I make the cursor
> hide?.
>   In Xserver-kdrive, I did this by "-hide-cursor" option, while running
> Xfbdev. like wise any option is there to hide cursor in Xorg?.
>
> With Regards
> J.Balakrishnan
>
> _______________________________________________
> xorg at lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg
>



More information about the xorg mailing list