summaryrefslogtreecommitdiffstats
path: root/views/screen_gtk.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 15:35:13 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 15:35:13 +0000
commite959f0b97dba7228c76b7722cf4227fdf6416524 (patch)
tree7af84f30c8a3560c19e17f7cb1dc220e1e4fa0be /views/screen_gtk.cc
parentbf6a46bed6770a7041c222e4505135bd30701576 (diff)
downloadchromium_src-e959f0b97dba7228c76b7722cf4227fdf6416524.zip
chromium_src-e959f0b97dba7228c76b7722cf4227fdf6416524.tar.gz
chromium_src-e959f0b97dba7228c76b7722cf4227fdf6416524.tar.bz2
Makes it so that when a folder is open on the bookmark bar and the
mouse moves over another folder, the menu for that folder is shown. BUG=355 TEST=thorougly test all possible permutations of bookmark menus you can think of, including drag and drop to the menus. Review URL: http://codereview.chromium.org/328012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/screen_gtk.cc')
-rw-r--r--views/screen_gtk.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/views/screen_gtk.cc b/views/screen_gtk.cc
index 9302853..a0daa19 100644
--- a/views/screen_gtk.cc
+++ b/views/screen_gtk.cc
@@ -58,5 +58,19 @@ gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
return gfx::Rect(bounds);
}
+gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
+ GdkWindow* window = gdk_window_at_pointer(NULL, NULL);
+ if (!window)
+ return NULL;
+
+ gpointer data = NULL;
+ gdk_window_get_user_data(window, &data);
+ GtkWidget* widget = reinterpret_cast<GtkWidget*>(data);
+ if (!widget)
+ return NULL;
+ widget = gtk_widget_get_toplevel(widget);
+ return GTK_IS_WINDOW(widget) ? GTK_WINDOW(widget) : NULL;
+}
+
} // namespace