diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 04:03:27 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 04:03:27 +0000 |
commit | 5c7c41ad79c21366a9a27b4fea114b2ebf8fbc58 (patch) | |
tree | 4f8becf0d748f502f9b6932d91768bc066ec0144 /chrome/common/gtk_util.cc | |
parent | c0d769d16ca94f36239fcd82725d909947f1cc1c (diff) | |
download | chromium_src-5c7c41ad79c21366a9a27b4fea114b2ebf8fbc58.zip chromium_src-5c7c41ad79c21366a9a27b4fea114b2ebf8fbc58.tar.gz chromium_src-5c7c41ad79c21366a9a27b4fea114b2ebf8fbc58.tar.bz2 |
Refactors drag support from TabContentsViewGtk into
TabContentsDragHandler so that it can be used by both Gtk and Views.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/165302
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gtk_util.cc')
-rw-r--r-- | chrome/common/gtk_util.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc index 08658a7..c97a3a5 100644 --- a/chrome/common/gtk_util.cc +++ b/chrome/common/gtk_util.cc @@ -488,4 +488,17 @@ void InitRendererPrefsFromGtkSettings(RendererPreferences* prefs) { g_free(rgba_style); } +gfx::Point ScreenPoint(GtkWidget* widget) { + int x, y; + gdk_display_get_pointer(gtk_widget_get_display(widget), NULL, &x, &y, + NULL); + return gfx::Point(x, y); +} + +gfx::Point ClientPoint(GtkWidget* widget) { + int x, y; + gtk_widget_get_pointer(widget, &x, &y); + return gfx::Point(x, y); +} + } // namespace gtk_util |