Open eric-kwok-nt opened 2 years ago
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
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 fromcv2.imshow()
, when the user runs a script again,cv2.waitKey(1) & 0xFF == ord("q")
will be evaluated toTrue
without the user pressing anything, causing the video output to end prematurely.Same issue has been documented in https://github.com/microsoft/wslg/issues/213