How to set mouse cursor position in C on linux?

后端 未结 6 1054
礼貌的吻别
礼貌的吻别 2020-12-14 07:52

how can I set the mouse cursor position in an X window using a C program under Linux? thanks :) (like setcursorpos() in WIN)

EDIT: I\'ve tried this

6条回答
  •  时光取名叫无心
    2020-12-14 08:46

    You want to write a X11 program that uses the call XWarpPointer function to move the point to a relative or global position. (Xlib Programming Manual, Vol 1)

    In general, using Xlib for programming the X Window System, is the most basic, and quite low-level interface for graphical programming on a Unix or Linux system. Most applications developed nowadays using a higher level library such as GTK or Qt for developing their GUI applications.

    Curses or NCurses (New Curses) is for programming terminal-oriented interfaces, so are not useful in this case.

提交回复
热议问题