diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-09 00:13:30 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-09 00:13:30 +0000 |
commit | 19aad64511d3fad539184abfe5af5ff6264e630c (patch) | |
tree | 02267694a54ea272091e74bfad14f4e7c6fa8d27 /chrome/common/gtk_util.cc | |
parent | 3aeef847d90b695428851813fc6ada34aac5a21d (diff) | |
download | chromium_src-19aad64511d3fad539184abfe5af5ff6264e630c.zip chromium_src-19aad64511d3fad539184abfe5af5ff6264e630c.tar.gz chromium_src-19aad64511d3fad539184abfe5af5ff6264e630c.tar.bz2 |
Implement URL Drag & Drop for the linux tabstrip.
BUG=none
TEST=Drag a link from Firefox into the Chromium tab strip. A new tab should open either before, after, or in the same tab depending on where the drop occurred.
Review URL: http://codereview.chromium.org/118411
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17915 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 515482b..c3369d9 100644 --- a/chrome/common/gtk_util.cc +++ b/chrome/common/gtk_util.cc @@ -93,6 +93,14 @@ gfx::Rect GetWidgetScreenBounds(GtkWidget* widget) { widget->allocation.width, widget->allocation.height); } +void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p) { + DCHECK(widget); + DCHECK(p); + + gfx::Point position = GetWidgetScreenPosition(widget); + p->SetPoint(p->x() + position.x(), p->y() + position.y()); +} + void InitRCStyles() { static const char kRCText[] = // Make our dialogs styled like the GNOME HIG. @@ -151,4 +159,9 @@ std::string ConvertAcceleratorsFromWindowsStyle(const std::string& label) { return ret; } +bool IsScreenComposited() { + GdkScreen* screen = gdk_screen_get_default(); + return gdk_screen_is_composited(screen) == TRUE; +} + } // namespace gtk_util |