summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 01:58:56 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 01:58:56 +0000
commitd09cd49e9312e576c3f24764d1e542bd7084094c (patch)
treee6286b76ddad4226cb268258152fef7c5403e8e6 /chrome
parentb03721e10e94a5a46d2835a1e11ddb590f668fa1 (diff)
downloadchromium_src-d09cd49e9312e576c3f24764d1e542bd7084094c.zip
chromium_src-d09cd49e9312e576c3f24764d1e542bd7084094c.tar.gz
chromium_src-d09cd49e9312e576c3f24764d1e542bd7084094c.tar.bz2
Use gdk_window_get_origin to determine the origin of the top-level window. gtk_window_get_position returns different values (includes frame or not) depending on the window manager.
BUG=none TEST=Using a non-composited window manager, drag the tab within the tab strip. The tab should be rendered within the bounds of the tabstrip and not in the frame. Review URL: http://codereview.chromium.org/115680 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/gtk_util.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
index ee637e7..01d952e 100644
--- a/chrome/common/gtk_util.cc
+++ b/chrome/common/gtk_util.cc
@@ -72,7 +72,8 @@ gfx::Point GetWidgetScreenPosition(GtkWidget* widget) {
while (parent) {
if (GTK_IS_WINDOW(parent)) {
int window_x, window_y;
- gtk_window_get_position(GTK_WINDOW(parent), &window_x, &window_y);
+ // Returns the origin of the window, excluding the frame if one is exists.
+ gdk_window_get_origin(parent->window, &window_x, &window_y);
x += window_x;
y += window_y;
return gfx::Point(x, y);