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

Unified Diff: chrome/browser/tab_contents/chrome_tab_contents_view_wrapper_gtk.cc

Issue 8561006: GTK: Speculative revert of r109465 to fix right clicking. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix stupid typo Created 9 years, 1 month 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: chrome/browser/tab_contents/chrome_tab_contents_view_wrapper_gtk.cc
diff --git a/chrome/browser/tab_contents/chrome_tab_contents_view_wrapper_gtk.cc b/chrome/browser/tab_contents/chrome_tab_contents_view_wrapper_gtk.cc
index e1aedff3cb4738f2f1029ff0375e893b55c4c01d..fd218881a34c45cd19abf60d2657861da073b38b 100644
--- a/chrome/browser/tab_contents/chrome_tab_contents_view_wrapper_gtk.cc
+++ b/chrome/browser/tab_contents/chrome_tab_contents_view_wrapper_gtk.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h"
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "ui/base/gtk/gtk_floating_container.h"
@@ -114,11 +115,14 @@ void ChromeTabContentsViewWrapperGtk::ShowContextMenu(
} else {
view = view_->tab_contents()->GetRenderWidgetHostView();
}
- if (!view)
+ RenderWidgetHostViewGtk* view_gtk =
+ static_cast<RenderWidgetHostViewGtk*>(view);
+ if (!view_gtk)
return;
context_menu_.reset(new RenderViewContextMenuGtk(
- view_->tab_contents(), params, GDK_CURRENT_TIME));
+ view_->tab_contents(), params, view_gtk->last_mouse_down() ?
+ view_gtk->last_mouse_down()->time : GDK_CURRENT_TIME));
context_menu_->Init();
gfx::Rect bounds;
« 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