Skip to content

gladevcp: flush forwarded key events to AXIS - #4840

Open
grandixximo wants to merge 1 commit into
LinuxCNC:2.9from
grandixximo:gladevcp-key-release-flush
Open

grandixximo wants to merge 1 commit into
LinuxCNC:2.9from
grandixximo:gladevcp-key-release-flush

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Fixes #4839.

keyboard_forward() forwards key events from an embedded GladeVCP panel to AXIS with python-xlib send_event(), which only queues the request. Nothing flushes it until the next forwarded key event, so the KeyRelease of the last key stays queued and an AXIS keyboard jog keeps running after the key is released. The fix is Jan's (+Jan+ on the forum): d.flush() after send_event().

Tested on 2.9 with configs/sim/axis/gladevcp/gladevcp_panel.ini under Xvfb: click into the panel, hold Page_Down for 0.5 s, release, watch Z.

  • without the flush: Z keeps jogging after release (-0.09 at release, -0.65 two seconds later), twice
  • with the flush: Z stops on release, twice

keyboard_forward() sends key events from an embedded GladeVCP panel to AXIS with python-xlib send_event(), which only queues the request in the client's output buffer. Nothing flushes it until the next round trip, the get_geometry() of the next forwarded key event. A KeyRelease therefore stays queued until another key is pressed, and an AXIS keyboard jog started with focus in the panel keeps running after the key is released.

Flush after each send_event().

The fix was found by Jan (+Jan+ on the LinuxCNC forum).

Fixes LinuxCNC#4839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant