Question

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.

Was it helpful?

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.

OTHER TIPS

If your video window is implemented in wxWidgets, you can handle wxEVT_LEFT_DOWN event and not skip it, i.e. avoid calling event.Skip() in your handler. This will prevent the default handler from executing and giving the focus to the window. However it won't prevent the user from doing it in some other way, e.g. by using Alt-TAB.

So a better idea would be to just ensure that you handle the keyboard events in the video window too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top