Skip to content

OpenCV python GUI window receiving last keypress from previous runs even after closing WSL #630

@eric-kwok-nt

Description

@eric-kwok-nt

For WSL users, the GUI window will receive the last keypress from previous run. i.e. after pressing q to close the GUI window such as a video output from cv2.imshow(), when the user runs a script again, cv2.waitKey(1) & 0xFF == ord("q") will be evaluated to True without the user pressing anything, causing the video output to end prematurely.

Same issue has been documented in microsoft/wslg#213

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions