diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 00:39:30 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 00:39:30 +0000 |
commit | 3904bf6d1ecc4e5ccd9fafa1d5919020f5d4261d (patch) | |
tree | 3b3926faef0b45dcfceb9173901ebd36520e166c | |
parent | a3cf4b02383f29a17aa5bfe4164f3f39fa3db058 (diff) | |
download | chromium_src-3904bf6d1ecc4e5ccd9fafa1d5919020f5d4261d.zip chromium_src-3904bf6d1ecc4e5ccd9fafa1d5919020f5d4261d.tar.gz chromium_src-3904bf6d1ecc4e5ccd9fafa1d5919020f5d4261d.tar.bz2 |
GTK: bookmark manager - fix coordinate check in multi-row drag workaround.
BUG=33907
TEST=see bug
Review URL: http://codereview.chromium.org/565005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37772 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/bookmark_manager_gtk.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc index 9c77346..554a867 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.cc +++ b/chrome/browser/gtk/bookmark_manager_gtk.cc @@ -1221,10 +1221,19 @@ gboolean BookmarkManagerGtk::OnRightTreeViewButtonPress( return FALSE; } + if (event->window != gtk_tree_view_get_bin_window(GTK_TREE_VIEW(tree_view))) + return FALSE; + + gint tree_x, tree_y; + gtk_tree_view_convert_bin_window_to_widget_coords( + GTK_TREE_VIEW(tree_view), + static_cast<gint>(event->x), + static_cast<gint>(event->y), + &tree_x, &tree_y); + GtkTreePath* path; gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), - static_cast<gint>(event->x), - static_cast<gint>(event->y), + tree_x, tree_y, &path, NULL, NULL, NULL); if (path == NULL) { |