Index: chrome_frame/utils.cc |
=================================================================== |
--- chrome_frame/utils.cc (revision 38776) |
+++ chrome_frame/utils.cc (working copy) |
@@ -857,3 +857,11 @@ |
return moniker_url; |
} |
+bool IsTopLevelWindow(HWND window) { |
+ long style = GetWindowLong(window, GWL_STYLE); // NOLINT |
+ if (!(style & WS_CHILD)) |
+ return true; |
+ |
+ HWND parent = GetParent(window); |
+ return !parent || (parent == GetDesktopWindow()); |
+} |