Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[osx] - log the window name if a window completly obscures XBMC and l…

…eads to framelimiting (so we can identify / add exceptional apps easily)
  • Loading branch information...
commit ec8e34ae155de1f7609c2efe00938963ced046e1 1 parent 3d35cf1
@Memphiz Memphiz authored davilla committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 xbmc/windowing/osx/WinSystemOSX.mm
View
11 xbmc/windowing/osx/WinSystemOSX.mm
@@ -1299,6 +1299,7 @@ static void DisplayReconfigured(CGDirectDisplayID display,
// default to false before we start parsing though the windows.
// if we are are obscured by any windows, then set true.
m_obscured = false;
+ static bool obscureLogged = false;
CGWindowListOption opts;
opts = kCGWindowListOptionOnScreenAboveWindow | kCGWindowListExcludeDesktopElements;
@@ -1355,6 +1356,12 @@ static void DisplayReconfigured(CGDirectDisplayID display,
if (CGRectContainsRect(windowBounds, bounds))
{
// if the windowBounds completely encloses our bounds, we are obscured.
+ if (!obscureLogged)
+ {
+ const char* cstr = CFStringGetCStringPtr(ownerName, CFStringGetSystemEncoding());
+ CLog::Log(LOGDEBUG, "WinSystemOSX: Fullscreen window %s obscures XBMC!", cstr);
+ obscureLogged = true;
+ }
m_obscured = true;
break;
}
@@ -1372,6 +1379,10 @@ static void DisplayReconfigured(CGDirectDisplayID display,
if (!m_obscured)
{
+ // if we are here we are not obscured by any fullscreen window - reset flag
+ // for allowing the logmessage above to show again if this changes.
+ if (obscureLogged)
+ obscureLogged = false;
std::vector<CRect> rects = ourBounds.SubtractRects(partialOverlaps);
// they got us covered
if (rects.size() == 0)
Please sign in to comment.
Something went wrong with that request. Please try again.