Commit 34825a53 authored by erg@chromium.org's avatar erg@chromium.org

GTK: Speculative revert of r109465 to fix right clicking.

BUG=104190, 103535
TEST=Fixes right clicking on Fedora per bug.


Review URL: http://codereview.chromium.org/8561006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110835 0039d316-1c4b-4281-b951-d872f2087c98
parent 16b045cf
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment