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

Issue 3003001: [GTK] correct tabstrip drag point calculation. (Closed)

Created:
10 years, 5 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
Elliot Glaysher
CC:
chromium-reviews, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

[GTK] correct tabstrip drag point calculation. Must account for discrepancy between widget->window coordinates and widget coordinates. BUG=48774 TEST=see bug Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52507

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Evan Stade
10 years, 5 months ago (2010-07-14 19:27:17 UTC) #1
Elliot Glaysher
10 years, 5 months ago (2010-07-14 19:41:46 UTC) #2
LGTM

On Wed, Jul 14, 2010 at 12:27 PM,  <estade@chromium.org> wrote:
> Reviewers: Elliot Glaysher,
>
> Description:
> [GTK] correct tabstrip drag point calculation.
>
> Must account for discrepancy between widget->window coordinates and widget
> coordinates.
>
> BUG=48774
> TEST=see bug
>
> Please review this at http://codereview.chromium.org/3003001/show
>
> SVN Base: http://src.chromium.org/git/chromium.git
>
> Affected files:
>  M chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
>
>
> 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(
>
>
>

Powered by Google App Engine
This is Rietveld 408576698