Page 1 of 1

CefRenderProcessHandler methods not called

PostPosted: Thu Jul 02, 2020 11:31 am
by naxma
Hi,

I'm using CefGlue version 78.2.14.0. I need to hook into when input gets focus to display OSD keyboard. For that I implemented CefRenderProcessHandler and OnFocusedNodeChanged. I return the instance in custom class of CefApp::GetRenderProcessHandler. However, GetRenderProcessHandler is never been called. CefApp::OnBeforeCommandLineProcessing IS called.

What's wrong here?

Markus

Re: CefRenderProcessHandler methods not called

PostPosted: Thu Jul 02, 2020 2:31 pm
by vmas
The GetRenderProcessHandler callback will be called on the render process main thread.

Re: CefRenderProcessHandler methods not called

PostPosted: Thu Jul 02, 2020 3:20 pm
by naxma
I know that. But anyways it did not get called. Does it need to be registered somewhere else?

Re: CefRenderProcessHandler methods not called

PostPosted: Thu Jul 02, 2020 3:57 pm
by magreenblatt
How are you testing if GetRenderProcessHandler is called? As mentioned above, it will only be called in the render process.

I don’t know the details of CefGlue, but in general the CefApp that implements GetRenderProcessHandler needs to be passed to the CefExecuteProcess function.

Re: CefRenderProcessHandler methods not called

PostPosted: Thu Jul 02, 2020 11:17 pm
by naxma
I added logging and set breakpoints. But they do not get caught nor does my logs have entrys. I do provide my custom CefApp to ExecuteProcesd. Any thoughts?

Re: CefRenderProcessHandler methods not called

PostPosted: Fri Jul 03, 2020 1:04 am
by naxma
Ok, now I understand what you write. It's the background process where it gets called. So when I want to hook up into OnFocusedNodeChanged I need to add inter process communication to get my keyboard displayed in my main GUI thread, right?

Re: CefRenderProcessHandler methods not called

PostPosted: Fri Jul 03, 2020 10:37 am
by magreenblatt
naxma wrote:Ok, now I understand what you write. It's the background process where it gets called. So when I want to hook up into OnFocusedNodeChanged I need to add inter process communication to get my keyboard displayed in my main GUI thread, right?

Probably yes.