diff options
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 |