From 1ee19742db740fb60ed78266039f65c93c85c836 Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Mon, 12 Oct 2009 17:03:59 +0000 Subject: Forwards mouse leave to renderer for views/gtk. BUG=none TEST=none Review URL: http://codereview.chromium.org/269051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28710 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/tab_contents/tab_contents_view_gtk.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc index 8667bce..ad274b3 100644 --- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc @@ -56,8 +56,10 @@ gboolean OnFocus(GtkWidget* widget, GtkDirectionType focus, } // Called when the mouse leaves the widget. We notify our delegate. -gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event, - TabContents* tab_contents) { +// WidgetGtk also defines OnLeaveNotify, so we use the name OnLeaveNotify2 +// here. +gboolean OnLeaveNotify2(GtkWidget* widget, GdkEventCrossing* event, + TabContents* tab_contents) { if (tab_contents->delegate()) tab_contents->delegate()->ContentsMouseEvent(tab_contents, false); return FALSE; @@ -142,10 +144,8 @@ RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget( view->InitAsChild(); g_signal_connect(view->native_view(), "focus", G_CALLBACK(OnFocus), tab_contents()); -/* g_signal_connect(view->native_view(), "leave-notify-event", - G_CALLBACK(OnLeaveNotify), tab_contents()); -*/ + G_CALLBACK(OnLeaveNotify2), tab_contents()); g_signal_connect(view->native_view(), "motion-notify-event", G_CALLBACK(OnMouseMove), tab_contents()); g_signal_connect(view->native_view(), "scroll-event", -- cgit v1.1