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

Unified Diff: ui/views/controls/menu/menu_controller.cc

Issue 1606053002: fix 'set but not used' GCC warning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 10b2cd914e768af579dec903fc6996c741838c10..86be859dcc47ad7c7ef9bbda0341291480dc4586 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -2269,12 +2269,15 @@ void MenuController::RepostEventAndCancel(SubmenuView* source,
// be used when reposting the event.
gfx::Point screen_loc(event->location());
View::ConvertPointToScreen(source->GetScrollViewContainer(), &screen_loc);
+
+#if defined(OS_WIN) || defined(OS_CHROMEOS)
gfx::NativeView native_view = source->GetWidget()->GetNativeView();
gfx::NativeWindow window = nullptr;
if (native_view) {
gfx::Screen* screen = gfx::Screen::GetScreenFor(native_view);
window = screen->GetWindowAtScreenPoint(screen_loc);
}
+#endif
#if defined(OS_WIN)
// We're going to close and we own the event capture. We need to repost the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698