From 0888e85c007b3b88167753654769a8e3129d0fbb Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Sat, 24 Oct 2009 00:27:52 +0000 Subject: GTK: Compute infobubble target rects correctly. I misunderstood how allocations work in the original version and wasn't handling the case where there are intermediate GdkWindows between the target widget and its toplevel window correctly. TEST=first-run, bookmark, and browser action bubbles get opened in the correct places under xmonad, metacity, and ion3 BUG=23373 Review URL: http://codereview.chromium.org/326017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29978 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/gtk_util.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/common/gtk_util.h') diff --git a/chrome/common/gtk_util.h b/chrome/common/gtk_util.h index 749aade..4f0278a 100644 --- a/chrome/common/gtk_util.h +++ b/chrome/common/gtk_util.h @@ -184,6 +184,10 @@ GdkCursor* GetCursor(GdkCursorType type); // Stacks a |popup| window directly on top of a |toplevel| window. void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel); +// Get a rectangle corresponding to a widget's allocation relative to its +// toplevel window's origin. +gfx::Rect GetWidgetRectRelativeToToplevel(GtkWidget* widget); + } // namespace gtk_util #endif // CHROME_COMMON_GTK_UTIL_H_ -- cgit v1.1