Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Xlib - MouseMove

DZone's Guide to

Xlib - MouseMove

·
Free Resource
// muove il mouse alle coordinate currentX + x, currentY + y


#include 
  
   
#include 
   
    

#include 
    
     
#include 
     
      

void mouseMove(int x, int y)
{
	Display *displayMain = XOpenDisplay(NULL);

	if(displayMain == NULL)
	{
		fprintf(stderr, "Errore nell'apertura del Display !!!\n");
		exit(EXIT_FAILURE);
	}

	XWarpPointer(displayMain, None, None, 0, 0, 0, 0, x, y);

	XCloseDisplay(displayMain);
}

     
    
   
  

// gcc source.c -L /usr/X11R6/lib -lX11
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}