The code that was supposed to set the pinentry window to the foreground did actually the opposite and unfocused it, so I always had to first click on the window in order to enter my password. At least on Windows 10/11 that's the case. When I removed that code, it worked fine.
- fixed a few warnings that could actually lead to bugs if char is signed
- fixed build error on MSYS2 with gcc 11: was using #define's of <unistd.h>, but not including it
- adjusted window and control sizes a bit, in some cases the text was cut off (based on MSYS2 package's .patch)