Index: views/widget/widget_gtk.cc |
=================================================================== |
--- views/widget/widget_gtk.cc (revision 17002) |
+++ views/widget/widget_gtk.cc (working copy) |
@@ -13,8 +13,7 @@ |
// Returns the position of a widget on screen. |
static void GetWidgetPositionOnScreen(GtkWidget* widget, int* x, int *y) { |
- GtkWidget* parent = widget; |
- while (parent) { |
+ while (widget) { |
if (GTK_IS_WINDOW(widget)) { |
int window_x, window_y; |
gtk_window_get_position(GTK_WINDOW(widget), &window_x, &window_y); |
@@ -25,7 +24,7 @@ |
// Not a window. |
*x += widget->allocation.x; |
*y += widget->allocation.y; |
- parent = gtk_widget_get_parent(parent); |
+ widget = gtk_widget_get_parent(widget); |
} |
} |
@@ -482,6 +481,8 @@ |
is_mouse_down_ = true; |
if (!has_capture_) { |
has_capture_ = true; |
+ // TODO: this should also do a gdk_pointer_grab. See gtkmenu.cc for details: |
brettw
2009/05/27 20:24:30
Line too long, and remove the empty // line here.
|
+ // |
gtk_grab_add(child_widget_parent_); |
} |
return true; |