diff options
author | gimli <gimli@gimlis-Mac-mini.local> | 2011-05-08 11:41:09 +0200 |
---|---|---|
committer | gimli <gimli@gimlis-Mac-mini.local> | 2011-05-08 11:41:09 +0200 |
commit | 1d0c2f3e099cb67c00fcd7e544daa8daa09a084f (patch) | |
tree | 94b984259922009cb41c7763694991a47c8abdec | |
parent | 6677a2bc79bf019b28720f0aae09f573d1ca84e5 (diff) |
[osx] Workaround to fix fullscreen switching in multi monitor setup.
-rw-r--r-- | xbmc/guilib/GraphicContext.cpp | 4 | ||||
-rw-r--r-- | xbmc/windowing/osx/WinSystemOSX.mm | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/guilib/GraphicContext.cpp b/xbmc/guilib/GraphicContext.cpp index 0cab11d27a..61bd4c6b8f 100644 --- a/xbmc/guilib/GraphicContext.cpp +++ b/xbmc/guilib/GraphicContext.cpp @@ -307,6 +307,10 @@ bool CGraphicContext::IsValidResolution(RESOLUTION res) void CGraphicContext::SetVideoResolution(RESOLUTION res, bool forceUpdate) { +#if defined __APPLE__ + /* Update the resolutions. XBMC window can be moved to another screen. */ + g_Windowing.UpdateResolutions(); +#endif RESOLUTION lastRes = m_Resolution; // If the user asked us to guess, go with desktop diff --git a/xbmc/windowing/osx/WinSystemOSX.mm b/xbmc/windowing/osx/WinSystemOSX.mm index 9ff835bf64..59964b4de2 100644 --- a/xbmc/windowing/osx/WinSystemOSX.mm +++ b/xbmc/windowing/osx/WinSystemOSX.mm @@ -391,8 +391,8 @@ bool CWinSystemOSX::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl if (g_guiSettings.GetBool("videoscreen.fakefullscreen")) { // This is Cocca Windowed FullScreen Mode - // Get the screen rect of our current display - NSScreen* pScreen = [[NSScreen screens] objectAtIndex:res.iScreen]; + // Get the screen rect of our current display + NSScreen* pScreen = [NSScreen mainScreen]; NSRect screenRect = [pScreen frame]; // remove frame origin offset of orginal display @@ -721,7 +721,7 @@ void CWinSystemOSX::GetScreenResolution(int* w, int* h, double* fps) window = [view window]; if (window) { - display_id = GetDisplayIDFromScreen( [window screen] ); + display_id = GetDisplayIDFromScreen( [NSScreen mainScreen] ); mode = CGDisplayCurrentMode(display_id); } } |