Mac: Fix creation of browsers parented to hidden windows.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1547@1492 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-10-25 21:11:46 +00:00
parent 1b26cd32d4
commit dee291acc8
2 changed files with 19 additions and 0 deletions

View File

@ -80,6 +80,12 @@ patches = [
'name': 'midi_1051',
'path': '../media/midi/',
},
{
# Fix creation of browsers parented to hidden windows on OS X.
# https://codereview.chromium.org/45513002/
'name': 'screen_mac',
'path': '../ui/gfx/',
},
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364',

View File

@ -0,0 +1,13 @@
Index: screen_mac.mm
===================================================================
--- screen_mac.mm (revision 217443)
+++ screen_mac.mm (working copy)
@@ -129,6 +129,8 @@
if (!window)
return GetPrimaryDisplay();
NSScreen* match_screen = [window screen];
+ if (!match_screen)
+ return GetPrimaryDisplay();
return GetDisplayForScreen(match_screen, false /* may not be primary */);
}