roadlabs / chromiumembedded

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

Mac: trunk: cefclient: Browser view extends outside of NSWindow bounds #1549

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pass a window size to CreateRootWindow() that is larger than the target 
screen size.

What is the expected output? What do you see instead?
The browser should be sized correctly to the NSWindow after display. Instead, 
the browser extends outside of the NSWindow bounds (top/right sides of the 
browser view cannot be seen or scrolled to).

Please use labels and text to provide additional information.
The OS will shrink the NSWindow upon display if it's too big for the target 
screen. If the CefBrowser is created with a size larger than the actual 
displayed NSWindow size (e.g. using contentView bounds before the NSWindow is 
displayed) than it won't be scaled correctly when the NSView is subsequently 
autosized. There are a few potential solutions:

1. Ensure that the NSWindow is initially created to a size that will fit on the 
target display. This is somewhat problematic because it's not always possible 
to know which display the window will appear on. For example, if there are 
multiple attached screens and if the target window size is retrieved via 
[NSScreen mainScreen] then it may return bounds for the wrong screen if the 
user changes keyboard focus between screens while the application is launching.

2. Create the CefBrowser after the NSWindow is displayed so that the browser 
size is correct to the NSWindow size (e.g. contentView bounds is the actual 
displayed size).

Related forum post: http://magpcss.org/ceforum/viewtopic.php?f=6&t=12678&p=24634

Original issue reported on code.google.com by magreenb...@gmail.com on 25 Feb 2015 at 4:44

GoogleCodeExporter commented 9 years ago
Issue 1550 has been merged into this issue.

Original comment by magreenb...@gmail.com on 2 Mar 2015 at 3:33

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1549

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:38