我使用xinput命令创建了一个虚假的鼠标指针,如here所述,该指令产生第二个指针,该指针在我的屏幕中心悬停。Linux:使用虚假鼠标指针的Xautomation
我现在想使用xte命令将其自动化,但不幸的是xte似乎只能控制我希望保留的硬件鼠标。
xte的手册页没有任何标志来指定要控制哪个指针。 我想知道是否有人有任何想法?
注:第二个指针纯粹是为了我能够在同一台计算机上运行,同时运行图形管线
编辑:通过看XTE源于是我找到引用XQueryPointer
Bool XQueryPointer(display, w, root_return, child_return, root_x_return, root_y_return,
win_x_return, win_y_return, mask_return)
Display *display;
Window w;
Window *root_return, *child_return;
int *root_x_return, *root_y_return;
int *win_x_return, *win_y_return;
unsigned int *mask_return;
//Arguments:
display Specifies the connection to the X server.
w Specifies the window.
root_return Returns the root window that the pointer is in.
child_return Returns the child window that the pointer is located in, if any.
root_x_return
root_y_return Return the pointer coordinates relative to the root window's origin.
win_x_return
win_y_return Return the pointer coordinates relative to the specified window.
mask_return Returns the current state of the modifier keys and pointer buttons.
来自Xlib类,您可以看到它只返回第一个鼠标指针,并且不会给出另一个选项。
EDIT2:翻翻的libx11-dev的来源,我发现在./src/QuPntr.c和Xlibint.h它提到,但代码是越来越难读,我走了我的深度
2013-12-08
tetris11