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

Unified Diff: chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc

Issue 3003001: [GTK] correct tabstrip drag point calculation. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 months 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/gtk/tabs/dragged_tab_controller_gtk.cc
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
index 70ecdb8fcadf7c6708162a5e849b1b4ece2bb62c..194704b5d8773feb1916cf6e7202abc5655df6c3 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -438,9 +438,9 @@ void DraggedTabControllerGtk::Detach() {
gfx::Point DraggedTabControllerGtk::ConvertScreenPointToTabStripPoint(
TabStripGtk* tabstrip, const gfx::Point& screen_point) {
- gint x, y;
- gdk_window_get_origin(tabstrip->tabstrip_->window, &x, &y);
- return gfx::Point(screen_point.x() - x, screen_point.y() - y);
+ gfx::Point tabstrip_screen_point =
+ gtk_util::GetWidgetScreenPosition(tabstrip->tabstrip_.get());
+ return screen_point.Subtract(tabstrip_screen_point);
}
gfx::Rect DraggedTabControllerGtk::GetDraggedTabTabStripBounds(
« 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