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 923014c09626c82db6984c801e5a273c59b5f2d5 1 parent 0d08d5c
@Memphiz Memphiz authored
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)

2 comments on commit 923014c

@davilla
Collaborator

hahahaha

@Memphiz
Owner

yeah - this is an os string - we have to ask for the right encoding :D

Please sign in to comment.
Something went wrong with that request. Please try again.