Bug 73769 - xcb_fake_test_input ignoring XCB_KEY_RELEASE
Summary: xcb_fake_test_input ignoring XCB_KEY_RELEASE
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-18 19:00 UTC by Saad Malik
Modified: 2018-12-13 18:35 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Compile as: gcc -o xdo -Wall -lm -lxcb -lxcb-xtest xdo.c (575 bytes, text/plain)
2014-01-18 19:00 UTC, Saad Malik
no flags Details

Description Saad Malik 2014-01-18 19:00:54 UTC
Created attachment 92349 [details]
Compile as: gcc -o xdo -Wall -lm -lxcb -lxcb-xtest xdo.c

The xcb_fake_test_input XCB_KEY_RELEASE call is being completely ignored. Please compile and run the attached program illustrating the problem. The program should only output 1 'w' letter, but it outputs 'wwwwwww...' continuously until I press a key. 

I initially submitted this problem on the XCB mailer list, but Ran Benita wasn't able to reproduce this issue and recommended that I open a bug with my system details.

Distribution: Arch (up-to-date)
Kernel: Linux Vaio-Saad 3.12.7-2-ck 
Versions:
libxcb 1.10-1
xcb-proto 1.10-1
Comment 1 Uli Schlachter 2014-01-18 19:25:51 UTC
The TEST FakeInput request is sent just fine (and produces just a single w here). Thus, not a xcb issue. Reassigning to the server.
Comment 2 Saad Malik 2014-01-18 20:12:29 UTC
Confirmed that it's an xorg problem. I downgraded xorg from 1.15.0-5 to 1.14.5-2 and now I get a single 'w' key:

[2014-01-18 11:41] [PACMAN] downgraded xf86-input-evdev (2.8.2-2 -> 2.8.2-1)
[2014-01-18 11:41] [PACMAN] downgraded xf86-input-synaptics (1.7.3-1 -> 1.7.2-1)
[2014-01-18 11:41] [PACMAN] downgraded xf86-video-intel (2.99.907-1 -> 2.21.15-1)
[2014-01-18 11:41] [PACMAN] downgraded xorg-server (1.15.0-5 -> 1.14.5-2)
Comment 3 Bastien Dejean 2014-01-19 09:45:59 UTC
I can trigger the issue by pressing *shift* while the example program is running.
Comment 4 Daniel Hahler 2015-06-13 00:16:55 UTC
Confirmed with xserver-xorg-core 2:1.17.1-0ubuntu3 on Ubuntu 15.04.

However, I've found this bug report when trying to figure out why XCB_KEY_RELEASE just after XCB_KEY_PRESS would not output _anything_ (when using awesomeWM's root.fake_input wrapper).

> I can trigger the issue by pressing *shift* while the example program is running.

The example program does not run long.  Pressing Shift afterwards changes the "w" chars being inserted to be uppercase for me.
Comment 5 Daniel Hahler 2015-06-13 00:23:38 UTC
Changing the example as follows makes it work:

    dpy = xcb_connect(NULL, NULL);
  
    xcb_test_fake_input(dpy, XCB_KEY_PRESS, 25, XCB_CURRENT_TIME, XCB_NONE, 0, 0, 0);
    xcb_test_fake_input(dpy, XCB_KEY_RELEASE, 25, XCB_CURRENT_TIME, XCB_NONE, 0, 0, 0);
    xcb_flush(dpy);
    sleep(1);
  
    xcb_disconnect(dpy);

Adding `sleep(1)` after `xcb_flush` and before `xcb_disconnect` appears to have an effect.
Comment 6 GitLab Migration User 2018-12-13 18:35:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/254.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.