DevTools - focus problems w/popup & question

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.

DevTools - focus problems w/popup & question

Postby jholt » Wed Jul 30, 2014 9:06 am

I'm currently opening a DevTools window as a popup (on a Ctrl+Shift+J), and have noticed a couple strange behaviors:

1. The popup is not modal (which is good), but is always above the host app top-frame window (which is annoying) - can this be changed, short of hosting DevTools in my own frame?

2. Occasionally when DevTools are open all the app windows freeze up until some combination of alt+tab and mouse-clicks restores behavior (especially if more than one DevTools popup is open - this is a CEF-powered tabbed browser app). I'm not explicitly changing focus/activation in my app, and this has been reported by multiple users. I noticed similar behavior with the default onbeforeunload default dialogs, so am wondering if this is related to some style/setting on CEF popups on Windows.

I'm using CEF3.1916 on a windows 7/x64 system (32-bit, x86 application). This is using the preferred multi-process/muli-UI thread configuration.
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: DevTools - focus problems w/popup & question

Postby jholt » Wed Jul 30, 2014 4:30 pm

An update:

1. Showing the DevTools in my own top-level frame (created in browser process, on my apps UI thread) appears to resolve both the "UI locking up/Alt+Tabs eventually unlocks" and "window always on Z-top" problem I see when using the CrBrowserMain-thread-based SetAsPopup devtools.

2. I suspect the CEF SetAsPopup code is using a "SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE)", which produces the same "always on Z-top" annoying behavior when I use it (SetForegroundWindow(m_hWnd) doesn't do this, fortunately)

3. I am invoking CefBrowserHost::CloseDevTools() (also on browser process, my UI thread) - which I expected would detach the DevTools, but this appears to be a no-op, as the DevTools remain open and active. Is that expected?
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: DevTools - focus problems w/popup & question

Postby magreenblatt » Tue Aug 05, 2014 4:53 am

jholt wrote:3. I am invoking CefBrowserHost::CloseDevTools() (also on browser process, my UI thread) - which I expected would detach the DevTools, but this appears to be a no-op, as the DevTools remain open and active. Is that expected?

Are you calling CloseDevTools before or after destroying the custom parent window hosting the DevTools?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: DevTools - focus problems w/popup & question

Postby jholt » Fri Aug 08, 2014 6:26 am

magreenblatt wrote:
jholt wrote:3. I am invoking CefBrowserHost::CloseDevTools() (also on browser process, my UI thread) - which I expected would detach the DevTools, but this appears to be a no-op, as the DevTools remain open and active. Is that expected?

Are you calling CloseDevTools before or after destroying the custom parent window hosting the DevTools?


I'm calling CloseDevTools before destroying the custom parent window.
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: DevTools - focus problems w/popup & question

Postby magreenblatt » Fri Aug 08, 2014 7:16 am

It should be sufficient to just close the parent window and let normal window destruction take care of the DevTools window.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 57 guests