I reduced the code to just basics. The app basically draw a sprite and a circle shape showing the state of a usb card-reader connected to the pc. When the card-reader is plugged in changes the circleshape color, then it do some stuff, like giving format to the card-reader, copy some files to,..., and then finally do a safe-remove.
every state is coded with a color and it handles as max usb ports as u have to plug in card-readers, so the second thread is intended to Format drive, copy files,..., safe-remove, without stopping the main thread who is listening windows events, drawing, and creating threads for every card-reader.
if i just call a function i will be calling a function from the second thread, so i suppose is the same.
what i'm doing is creating a win32 app, starting a windows, subscribing it to the WM_DEVICECHANGE windows event and hiding it. What i discover from unhide that window is when the win32 window is onfocus or active i don't have the problem to move the mouse or press a key to update the rendering.
why it happens idk. That is why i asked here
https://en.sfml-dev.org/forums/index.php?topic=22016.0 if there is a way to subscribe the render window to the WM_DEVICECHANGE windows event directly with out creating the Win32 window.
or can i create a sf::view or a sf::renderwindow inside the win32 window?
Thanks anyway.