a sandwhich
a sandwhich

Reputation: 4448

Control cursor with c++ and x11

What x11 header file and function would I use to change the position of the cursor on the display? I have heard there is a straight forward function on Vc++ but I wish to be able to use this on linux.

Upvotes: 0

Views: 773

Answers (1)

SingleNegationElimination
SingleNegationElimination

Reputation: 156128

You can't trivially port programs from windows to xwindows, at least not without using a cross platform toolkit like gtk+ or Qt.

That said, the most basic way to move the pointer about on X is using the XWarpPointer() method, which is to be had by including X11/Xlib.h

EDIT:

Apparently you are using Qt after all. you need to use QCursor::setpos which is defined in QCursor

Upvotes: 1

Related Questions