Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eric-kwok-nt opened this issue Mar 23, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@eric-kwok-nt
Copy link
Contributor

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

@eric-kwok-nt eric-kwok-nt added the bug Something isn't working label Mar 23, 2022
@liyier90
Copy link
Contributor

After updating WSL2 to the latest version with wsl --update, this issue appears to be resolved.

WSL2 version after update:

WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants