cloudtrends / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
1 stars 1 forks source link

UIT_CreateBrowser doesn't respect window's visibility setting #201

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In HandleBeforeCreated, remove the window's visibility attribute 
(windowInfo.m_dwStyle &= ~WS_VISIBLE)
2.
3.

What is the expected output? What do you see instead?

When HandleBeforeBrowse is called, the window should still be hidden.  However, 
the window is visible at that time.

What version of the product are you using? On what operating system?

CEF 199.

Please provide any additional information below.

Attached patch fixes this issue.

Original issue reported on code.google.com by emerick on 7 Mar 2011 at 8:09

Attachments:

GoogleCodeExporter commented 9 years ago
Committed as revision 200. Changes were required in a few other places as well. 
I've also added a test (define TEST_REDIRECT_POPUP_URLS in cefclient.cpp) that 
demonstrates how to use a hidden window to redirect popup URL loading.

Original comment by magreenb...@gmail.com on 8 Mar 2011 at 1:12

GoogleCodeExporter commented 9 years ago
  if (window_info_.m_dwStyle & WS_VISIBLE)
    flags |= SWP_SHOWWINDOW;
  else
    flags |= SWP_NOACTIVATE;

I've changed the above code into the following:

  UINT flags = SWP_NOZORDER | SWP_SHOWWINDOW;
  if (!(window_info_.m_dwStyle & WS_VISIBLE))
      flags |= SWP_NOACTIVATE;

If window_info.m_dwStyle isn't WS_VISIBLE at first, the child WebViewHost isn't 
WS_VISIBLE either, then call ShowWindow() only effect the CefBrowserWindow, not 
the WebViewHost, so WebViewHost window must have the WS_VISIBLE property.

If the window_info_.m_dwStyle doesn't have WS_VISIBLE, the child WebViewHost  
can't be seen even if it has WS_VISIBLE property.

So WebViewHost must have the WS_VISIBLE property.

Original comment by Zhaojun....@gmail.com on 30 Dec 2011 at 7:50

GoogleCodeExporter commented 9 years ago
Please create a separate issue for comment#2 so it doesn't get lost.

Original comment by magreenb...@gmail.com on 11 Jan 2012 at 10:38