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

Unified Diff: views/widget/widget_gtk.cc

Issue 115826: Makes MenuButton compile and fixes bug in GtkWidget I happened upon.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « views/views.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698