b=672103 revert removal of early return in bug 624329, to avoid unwanted rollup on spurious ConfigureNotify events from Cygwin/X r=roc
authorKarl Tomlinson <karlt+@karlt.net>
Mon, 08 Aug 2011 17:28:06 +1200
changeset 73991 186d7066e1e0431f63c4b419df06d5e7f52e1597
parent 73990 4ee36bb66230b5b7b0e6878c57a1bb497fb2eb9a
child 73992 a637f174ceab3cb2ec2ec7569409e431250c277f
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersroc
bugs672103, 624329
milestone8.0a1
b=672103 revert removal of early return in bug 624329, to avoid unwanted rollup on spurious ConfigureNotify events from Cygwin/X r=roc
widget/src/gtk2/nsWindow.cpp
--- a/widget/src/gtk2/nsWindow.cpp
+++ b/widget/src/gtk2/nsWindow.cpp
@@ -2374,16 +2374,25 @@ nsWindow::OnConfigureEvent(GtkWidget *aW
     //   the client window.
     //
     //   Override-redirect windows are children of the root window so parent
     //   coordinates are root coordinates.
 
     LOG(("configure event [%p] %d %d %d %d\n", (void *)this,
          aEvent->x, aEvent->y, aEvent->width, aEvent->height));
 
+    // mBounds.x/y are set to the window manager frame top-left when Move() or
+    // Resize()d from within Gecko, so comparing with the client window
+    // top-left is weird.  However, mBounds.x/y are set to client window
+    // position below, so this check avoids unwanted rollup on spurious
+    // configure events from Cygwin/X (bug 672103).
+    if (mBounds.x == aEvent->x &&
+        mBounds.y == aEvent->y)
+        return FALSE;
+
     if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) {
         check_for_rollup(aEvent->window, 0, 0, PR_FALSE, PR_TRUE);
     }
 
     // This event indicates that the window position may have changed.
     // mBounds.Size() is updated in OnSizeAllocate().
 
     // (The gtk_window_get_window_type() function is only available from