Bug 626157, drag and drop disabled when a plugin is open in another tab, r=karlt,a=roc
authorNeil Deakin <neil@mozilla.com>
Mon, 24 Jan 2011 09:50:52 -0500
changeset 61174 32f8623164fbe5a0a5438333bab96d61072e6ca3
parent 61173 00caaac7044f4e49da06fd8419543ee2fbbe05b2
child 61175 e09b598992e8f4495e1bd7d51f8b95d39ee966de
push id18257
push userneil@mozilla.com
push dateMon, 24 Jan 2011 14:51:47 +0000
treeherdermozilla-central@32f8623164fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt, roc
bugs626157
milestone2.0b10pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 626157, drag and drop disabled when a plugin is open in another tab, r=karlt,a=roc
widget/src/gtk2/nsWindow.cpp
--- a/widget/src/gtk2/nsWindow.cpp
+++ b/widget/src/gtk2/nsWindow.cpp
@@ -6264,23 +6264,25 @@ get_inner_gdk_window (GdkWindow *aWindow
 {
     gint cx, cy, cw, ch, cd;
     GList * children = gdk_window_peek_children(aWindow);
     guint num = g_list_length(children);
     for (int i = 0; i < (int)num; i++) {
         GList * child = g_list_nth(children, num - i - 1) ;
         if (child) {
             GdkWindow * childWindow = (GdkWindow *) child->data;
-            gdk_window_get_geometry (childWindow, &cx, &cy, &cw, &ch, &cd);
-            if ((cx < x) && (x < (cx + cw)) &&
-                (cy < y) && (y < (cy + ch)) &&
-                gdk_window_is_visible (childWindow)) {
-                return get_inner_gdk_window (childWindow,
-                                             x - cx, y - cy,
-                                             retx, rety);
+            if (get_window_for_gdk_window(childWindow)) {
+                gdk_window_get_geometry (childWindow, &cx, &cy, &cw, &ch, &cd);
+                if ((cx < x) && (x < (cx + cw)) &&
+                    (cy < y) && (y < (cy + ch)) &&
+                    gdk_window_is_visible (childWindow)) {
+                    return get_inner_gdk_window (childWindow,
+                                                 x - cx, y - cy,
+                                                 retx, rety);
+                }
             }
         }
     }
     *retx = x;
     *rety = y;
     return aWindow;
 }