Catching window events occurred in child pop up window

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Catching window events occurred in child pop up window

Postby tashimaya » Wed Oct 29, 2014 11:27 am

Hi

I am trying to catch "WM_ENTERSIZEMOVE" and "WM_EXITSIZEMOVE" events occurred in child popup windows. This is so that I can apply the following workaround:

https://code.google.com/p/chromiumembedded/issues/detail?id=1208#c15

The workaround works fine for the main parent window. However some of my child popup windows contain drop down menus and the bug mentioned in the thread above still persists.

Does anybody know how to catch these events?

Many thanks
tashimaya
Techie
 
Posts: 36
Joined: Fri Oct 10, 2014 7:18 am

Re: Catching window events occurred in child pop up window

Postby magreenblatt » Wed Oct 29, 2014 11:44 am

You will need to create your own parent window for the popups. See for example viewtopic.php?f=6&t=1355.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Catching window events occurred in child pop up window

Postby tashimaya » Wed Oct 29, 2014 12:13 pm

Thanks for your quick reply.

I have read the thread a few times but still don't understand it well. I'm hoping you can give me some more information.

> Now create my custom parent and a new ClientHandler for the popup.

What could be the type of "custom parent"?

I've got something like:

Code: Select all
class LifeSpanHandler : CefLifeSpanHandler
{
   private customParent;
   private handler;

   OnBeforePopup(CefBrowser browser, CefFrame frame, ...)
   {
      // What to do with this?
      handler = new ClientHandler();
      // And how do use it with customParent?
      
   }

   OnAfterCreated(CefBrowser browser)
   {
      // How do I "Reparent the browser window into the custom parent"?
   }
}


Many thanks
tashimaya
Techie
 
Posts: 36
Joined: Fri Oct 10, 2014 7:18 am

Re: Catching window events occurred in child pop up window

Postby magreenblatt » Wed Oct 29, 2014 12:28 pm

I'm fixing issue #1208 now so it's probably easier if you just wait for a new build that includes the fix.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Catching window events occurred in child pop up window

Postby tashimaya » Wed Oct 29, 2014 3:23 pm

That's good to know. Thanks for your great work!
tashimaya
Techie
 
Posts: 36
Joined: Fri Oct 10, 2014 7:18 am

Re: Catching window events occurred in child pop up window

Postby tashimaya » Wed Oct 29, 2014 3:33 pm

Would you be able to tell me if your fix will be in the core CEF code or within an application that uses the core code (e.g., cefclient)? I'm using CefGlue so wondering if updating my CEF would be enough when the fix is ready. Many thanks.
tashimaya
Techie
 
Posts: 36
Joined: Fri Oct 10, 2014 7:18 am

Re: Catching window events occurred in child pop up window

Postby magreenblatt » Wed Oct 29, 2014 7:20 pm

tashimaya wrote:Would you be able to tell me if your fix will be in the core CEF code or within an application that uses the core code (e.g., cefclient)? I'm using CefGlue so wondering if updating my CEF would be enough when the fix is ready. Many thanks.

It will work without client changes for popup windows. There is a new method (CefBrowserHost::NotifyMoveOrResizeStarted) that needs to be called by client applications to fix the issue for child browser windows.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 39 guests