Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: ui/base/win/hwnd_util.cc

Issue 10270029: Fullscreen can't use the desktop as a parent in metro mode (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/win/hwnd_util.h ('k') | ui/base/win/window_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/hwnd_util.cc
===================================================================
--- ui/base/win/hwnd_util.cc (revision 134777)
+++ ui/base/win/hwnd_util.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/i18n/rtl.h"
#include "base/string_util.h"
+#include "base/win/metro.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -181,4 +182,18 @@
SendMessage(window, WM_SYSCOMMAND, command, 0);
}
+extern "C" {
+ typedef HWND (*RootWindow)();
+}
+
+HWND GetWindowToParentTo(bool get_real_hwnd) {
+ HMODULE metro = base::win::GetMetroModule();
+ if (!metro)
+ return get_real_hwnd ? ::GetDesktopWindow() : HWND_DESKTOP;
+ // In windows 8 metro-mode the root window is not the desktop.
+ RootWindow root_window =
+ reinterpret_cast<RootWindow>(::GetProcAddress(metro, "GetRootWindow"));
+ return root_window();
+}
+
} // namespace ui
« no previous file with comments | « ui/base/win/hwnd_util.h ('k') | ui/base/win/window_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698