remove unused GdkWindow parameter to check_for_rollup b=500081 r=roc
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 02 Feb 2012 15:11:06 +1300
changeset 89156 34e3dad7a39daaf8109ae458e600459f7ce0256b
parent 89155 e4ea03a30a09740a6919fae1189d64758bc4b21b
child 89157 31d649d2db254d6ae5752cfcc630ba1f785839e6
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs500081
milestone13.0a1
remove unused GdkWindow parameter to check_for_rollup b=500081 r=roc
widget/gtk2/nsWindow.cpp
--- a/widget/gtk2/nsWindow.cpp
+++ b/widget/gtk2/nsWindow.cpp
@@ -155,18 +155,17 @@ using namespace mozilla::widget;
 using mozilla::gl::GLContext;
 using mozilla::layers::LayerManagerOGL;
 
 // Don't put more than this many rects in the dirty region, just fluff
 // out to the bounding-box if there are more
 #define MAX_RECTS_IN_REGION 100
 
 /* utility functions */
-static bool       check_for_rollup(GdkWindow *aWindow,
-                                   gdouble aMouseX, gdouble aMouseY,
+static bool       check_for_rollup(gdouble aMouseX, gdouble aMouseY,
                                    bool aIsWheel, bool aAlwaysRollup);
 static bool       is_mouse_in_window(GdkWindow* aWindow,
                                      gdouble aMouseX, gdouble aMouseY);
 static nsWindow  *get_window_for_gtk_widget(GtkWidget *widget);
 static nsWindow  *get_window_for_gdk_window(GdkWindow *window);
 static GtkWidget *get_gtk_widget_for_gdk_window(GdkWindow *window);
 static GdkCursor *get_gtk_cursor(nsCursor aCursor);
 
@@ -2352,17 +2351,17 @@ nsWindow::OnConfigureEvent(GtkWidget *aW
     nsIntRect screenBounds;
     GetScreenBounds(screenBounds);
 
     if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) {
         // This check avoids unwanted rollup on spurious configure events from
         // Cygwin/X (bug 672103).
         if (mBounds.x != screenBounds.x ||
             mBounds.y != screenBounds.y) {
-            check_for_rollup(aEvent->window, 0, 0, false, true);
+            check_for_rollup(0, 0, false, 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
     // version 2.20.)
@@ -2745,18 +2744,18 @@ nsWindow::OnButtonPressEvent(GtkWidget *
     sLastButtonReleaseTime = 0;
 
     nsWindow *containerWindow = GetContainerWindow();
     if (!gFocusWindow && containerWindow) {
         containerWindow->DispatchActivateEvent();
     }
 
     // check to see if we should rollup
-    bool rolledUp = check_for_rollup(aEvent->window, aEvent->x_root,
-                                       aEvent->y_root, false, false);
+    bool rolledUp =
+        check_for_rollup(aEvent->x_root, aEvent->y_root, false, false);
     if (gConsumeRollupEvent && rolledUp)
         return;
 
     gdouble pressure = 0;
     gdk_event_get_axis ((GdkEvent*)aEvent, GDK_AXIS_PRESSURE, &pressure);
     mLastMotionPressure = pressure;
 
     PRUint16 domButton;
@@ -2910,17 +2909,17 @@ nsWindow::OnContainerFocusOutEvent(GtkWi
         if (!shouldRollup) {
             // we also roll up when a drag is from a different application
             nsCOMPtr<nsIDOMNode> sourceNode;
             dragSession->GetSourceNode(getter_AddRefs(sourceNode));
             shouldRollup = (sourceNode == nsnull);
         }
 
         if (shouldRollup) {
-            check_for_rollup(aEvent->window, 0, 0, false, true);
+            check_for_rollup(0, 0, false, true);
         }
     }
 
 #if defined(MOZ_WIDGET_GTK2) && defined(MOZ_X11)
     // plugin lose focus
     if (gPluginFocusWindow) {
         nsRefPtr<nsWindow> kungFuDeathGrip = gPluginFocusWindow;
         gPluginFocusWindow->LoseNonXEmbedPluginFocus();
@@ -3269,18 +3268,18 @@ nsWindow::OnKeyReleaseEvent(GtkWidget *a
 
     return FALSE;
 }
 
 void
 nsWindow::OnScrollEvent(GtkWidget *aWidget, GdkEventScroll *aEvent)
 {
     // check to see if we should rollup
-    bool rolledUp =  check_for_rollup(aEvent->window, aEvent->x_root,
-                                        aEvent->y_root, true, false);
+    bool rolledUp =
+        check_for_rollup(aEvent->x_root, aEvent->y_root, true, false);
     if (gConsumeRollupEvent && rolledUp)
         return;
 
     nsMouseScrollEvent event(true, NS_MOUSE_SCROLL, this);
     switch (aEvent->direction) {
     case GDK_SCROLL_UP:
         event.scrollFlags = nsMouseScrollEvent::kIsVertical;
         event.delta = -3;
@@ -5220,17 +5219,17 @@ nsWindow::HideWindowChrome(bool aShouldH
 #else
     gdk_flush ();
 #endif /* MOZ_X11 */
 
     return NS_OK;
 }
 
 static bool
-check_for_rollup(GdkWindow *aWindow, gdouble aMouseX, gdouble aMouseY,
+check_for_rollup(gdouble aMouseX, gdouble aMouseY,
                  bool aIsWheel, bool aAlwaysRollup)
 {
     bool retVal = false;
     nsCOMPtr<nsIWidget> rollupWidget = do_QueryReferent(gRollupWindow);
 
     if (rollupWidget && gRollupListener) {
         GdkWindow *currentPopup =
             (GdkWindow *)rollupWidget->GetNativeData(NS_NATIVE_WINDOW);