summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 21:22:04 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 21:22:04 +0000
commit5cd90e4a71c974da91156f76faf488ce59db16b0 (patch)
tree669b20b600f66d13204ca8b38bd5f9c1e3777c3e /views/widget
parent3984b0c8e5948a8054d99c75654046bbd1700965 (diff)
downloadchromium_src-5cd90e4a71c974da91156f76faf488ce59db16b0.zip
chromium_src-5cd90e4a71c974da91156f76faf488ce59db16b0.tar.gz
chromium_src-5cd90e4a71c974da91156f76faf488ce59db16b0.tar.bz2
Fixes possible crash in menus and makes widgetgtk not send out
mousemove if the event is the result of a grab. BUG=45734 TEST=none Review URL: http://codereview.chromium.org/2841018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/widget_gtk.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index c3b0814..1e73e38 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -991,6 +991,12 @@ gboolean WidgetGtk::OnEnterNotify(GtkWidget* widget, GdkEventCrossing* event) {
return false;
}
+ if (has_capture_ && event->mode == GDK_CROSSING_GRAB) {
+ // Doing a grab results an async enter event, regardless of where the mouse
+ // is. We don't want to generate a mouse move in this case.
+ return false;
+ }
+
if (!last_mouse_event_was_move_ && !is_mouse_down_) {
// When a mouse button is pressed gtk generates a leave, enter, press.
// RootView expects to get a mouse move before a press, otherwise enter is