diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 18:08:14 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 18:08:14 +0000 |
commit | f4d43dbdc68e7a8863cab509e6f159c04129fe96 (patch) | |
tree | a6b29bfb5104b45dc228d44852c65cdd722fdff4 /content/browser | |
parent | a8165a2ee9ddf0b0cf3c195bb52a05887e64092b (diff) | |
download | chromium_src-f4d43dbdc68e7a8863cab509e6f159c04129fe96.zip chromium_src-f4d43dbdc68e7a8863cab509e6f159c04129fe96.tar.gz chromium_src-f4d43dbdc68e7a8863cab509e6f159c04129fe96.tar.bz2 |
Fix a bug where window.screen would return 0, 0 as the width and height
if the page requesting the dimensions didn't have a GDK window associated
with it and there was no GDK window under the mouse pointer.
Instead of using gdk_display_get_window_at_pointer, use
gdk_display_get_default_group which will always return a valid value. This
means extension background pages will always get the screen size of the
primary monitor.
BUG=86605
Review URL: http://codereview.chromium.org/7241003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_gtk.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_widget_host_gtk.cc b/content/browser/renderer_host/render_widget_host_gtk.cc index b7dd333..7233ba0 100644 --- a/content/browser/renderer_host/render_widget_host_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_gtk.cc @@ -28,7 +28,7 @@ void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, gdk_window = widget->window; } else { GdkDisplay* display = gdk_display_get_default(); - gdk_window = gdk_display_get_window_at_pointer(display, NULL, NULL); + gdk_window = gdk_display_get_default_group(display); } if (!gdk_window) return; |