发送X11鼠标事件的正确方法
我正在尝试编写一个 X11 输入驱动程序,可以使用 Android 手机上的触摸屏来移动和单击鼠标。我已经可以正常移动鼠标了,但是我无法让应用程序正确识别点击。我当前的代码位于 https://gist.github.com/3981cedec9d5c55af15f 。
首先,当我单击背景窗口时,它会成为主窗口,但不会移动到屏幕前面。其次,如果我右键单击,整个屏幕都会对我的单击没有响应。最后,单击窗口按钮(关闭、最小化、最大化)似乎没有任何作用。是否有任何我没有发送的事件?
I am trying to write an X11 input driver that can use the touchscreen on my Android phone to move and click the mouse. I've gotten moving the mouse alright, but I'm having trouble getting the clicks recognized correctly by the applications. My current code is up at https://gist.github.com/3981cedec9d5c55af15f .
First of all, when I click on a background window, it becomes the primary window, but it does is not moved to the front of the screen. Second of all, if I right click, the entire screen becomes unresponsive to my clicking. Finally, clicking on the window buttons (close, minimize, maximize) don't seem to do anything. Are there any events that I am not sending?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在编写驱动程序,为什么要使用合成输入事件,而不是编写由 X 服务器加载的 X 服务器驱动程序模块?我将从 xf86-input-evdev 驱动程序开始作为起点,并根据需要重写它。
http://cgit.freedesktop.org/xorg/驱动程序/xf86-input-evdev/tree/?h=master
If you're writing a driver, why are using synthetic input events, instead of writing a X server driver module, that gets loaded by the X server? I'd start with the xf86-input-evdev driver as a starting point and rewrite it as needed.
http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/tree/?h=master