summaryrefslogtreecommitdiffstats
path: root/chrome/common/gtk_util.h
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 00:27:52 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 00:27:52 +0000
commit0888e85c007b3b88167753654769a8e3129d0fbb (patch)
tree9d44790c64c762b367b8ce48f22affd5e14cac17 /chrome/common/gtk_util.h
parent5de6dace1d151d7929fee89e722e2d18709027d8 (diff)
downloadchromium_src-0888e85c007b3b88167753654769a8e3129d0fbb.zip
chromium_src-0888e85c007b3b88167753654769a8e3129d0fbb.tar.gz
chromium_src-0888e85c007b3b88167753654769a8e3129d0fbb.tar.bz2
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
Diffstat (limited to 'chrome/common/gtk_util.h')
-rw-r--r--chrome/common/gtk_util.h4
1 files changed, 4 insertions, 0 deletions
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_