Search code examples
visual-c++wxwidgetspjsip

Stop window from getting focus on click on it


Hello I am using pjsua http://www.pjsip.org/pjsua.htm and I am making video call application. My problem is that when I establish a connection and video is on, if I click on the video, the video window gets the focus. So in that moment I can not use the keyboard shortcuts for my application (because now the video window is on focus). I need to stop the video window from being clickable at all so that it never gets focus.


Solution

  • I fixed the problem just by editing the mouse event SDL_MOUSEBUTTONDOWN of the SDL Window. I've used BringWindowToTop and it does the job to return the focus to the window that I want to.