【问题标题】:XTestFakeButtonEvent not working on GNOME barXTestFakeButtonEvent 在 GNOME 栏上不起作用
【发布时间】:2021-01-02 00:12:57
【问题描述】:

我正在编写一个可访问性应用程序,该应用程序通过使用键盘为用户单击鼠标。我正在使用

Display *display = XOpenDisplay(NULL);
XTestFakeButtonEvent(display, button, true, CurrentTime); // true is 'mouse down'
XFlush(display);
XCloseDisplay(display);

它在我能看到的任何窗口上都很好用,除了 GNOME 上栏(上栏带有日期和时间,右侧的图标包括“关机”图标):

这个栏似乎完全忽略了我使用上面的代码生成的 X11 事件。

为什么会这样?有什么办法解决吗?

【问题讨论】:

    标签: c++ linux x11


    【解决方案1】:

    似乎在两个“按钮按下”+“按钮释放”事件之前生成一个“按钮释放”事件修复了它。

    【讨论】:

      猜你喜欢
      • 2013-04-05
      • 2021-01-31
      • 2011-10-10
      • 1970-01-01
      • 2021-09-04
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多