# HG changeset patch
# Parent  ad7c48831208cad84bd7b22844b25f6e2e1cb397

diff --git a/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c b/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c
--- a/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c
+++ b/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c
@@ -1296,17 +1296,17 @@ void handleKeyPress(AppInfo *app, XEvent
       cancelAction(app);
       break;
     default:
       addToPassphrase(app, s[0]);
       break;
    }
 }
 
-Bool eventIsInsideButton(AppInfo *app, XEvent *event, ButtonInfo button)
+Bool eventIsInsideButton(AppInfo *app, ButtonInfo button, XEvent *event)
 {
    /* 'gcc -Wall' complains about 'app' being an unused parameter. 
     * Tough.  We might want to use it later, and then we don't have
     * to change it in each place it's called.  Performance won't suffer.
     */
    int status = False;
    int x, y;
    
@@ -1338,39 +1338,39 @@ void handleButtonPress(AppInfo *app, XEv
 {
    DialogInfo *d = app->dialog;
 
    cancelInputTimeout(app);
    if (event->xbutton.button != Button1) {
       return;
    }
    if (ButtonPress == event->type) {
-      if (eventIsInsideButton(app, event, d->okButton)) {
+      if (eventIsInsideButton(app, d->okButton, event)) {
 	 d->pressedButton = OK_BUTTON;
 	 d->okButton.pressed = True;
 	 paintButton(app, d->dialogWindow, d->okButton);
-      } else if (eventIsInsideButton(app, event, d->cancelButton)) {
+      } else if (eventIsInsideButton(app, d->cancelButton, event)) {
 	 d->pressedButton = CANCEL_BUTTON;
 	 d->cancelButton.pressed = True;
 	 paintButton(app, d->dialogWindow, d->cancelButton);
       } else {
 	 d->pressedButton = NO_BUTTON;
       }
    } else if (ButtonRelease == event->type) {
       if (OK_BUTTON == d->pressedButton) {
-	 if (eventIsInsideButton(app, event, d->okButton)) {
+	 if (eventIsInsideButton(app, d->okButton, event)) {
 	    acceptAction(app);
 	 } else {
 	    if (d->okButton.pressed) {
 	       d->okButton.pressed = False;
 	       paintButton(app, d->dialogWindow, d->okButton);
 	    }
 	 }
       } else if (CANCEL_BUTTON == d->pressedButton) {
-	 if (eventIsInsideButton(app, event, d->cancelButton)) {
+	 if (eventIsInsideButton(app, d->cancelButton, event)) {
 	    cancelAction(app);
 	 } else {
 	    if (d->cancelButton.pressed) {
 	       d->cancelButton.pressed = False;
 	       paintButton(app, d->dialogWindow, d->cancelButton);
 	    }
 	 }
       }
@@ -1380,29 +1380,29 @@ void handleButtonPress(AppInfo *app, XEv
 
 void handlePointerMotion(AppInfo *app, XEvent *event)
 {
    DialogInfo *d = app->dialog;
    
    if (NO_BUTTON == d->pressedButton) {
       return;
    } else if (OK_BUTTON == d->pressedButton) {
-      if (eventIsInsideButton(app, event, d->okButton)) {
+      if (eventIsInsideButton(app, d->okButton, event)) {
 	 if (!(d->okButton.pressed)) {
 	    d->okButton.pressed = True;
 	    paintButton(app, d->dialogWindow, d->okButton);
 	 }
       } else {
 	 if (d->okButton.pressed) {
 	    d->okButton.pressed = False;
 	    paintButton(app, d->dialogWindow, d->okButton);
 	 }
       }
    } else if (CANCEL_BUTTON == d->pressedButton) {
-      if (eventIsInsideButton(app, event, d->cancelButton)) {
+      if (eventIsInsideButton(app, d->cancelButton, event)) {
 	 if (!(d->cancelButton.pressed)) {
 	    d->cancelButton.pressed = True;
 	    paintButton(app, d->dialogWindow, d->cancelButton);
 	 }
       } else {
 	 if (d->cancelButton.pressed) {
 	    d->cancelButton.pressed = False;
 	    paintButton(app, d->dialogWindow, d->cancelButton);
diff --git a/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.h b/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.h
--- a/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.h
+++ b/x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.h
@@ -253,16 +253,16 @@ void exitApp(AppInfo *app, int exitCode)
 void acceptAction(AppInfo *app);
 void cancelAction(AppInfo *app);
 
 void backspacePassphrase(AppInfo *app);
 void erasePassphrase(AppInfo *app);
 void addToPassphrase(AppInfo *app, char c);
 
 void handleKeyPress(AppInfo *app, XEvent *event);
-Bool eventIsInsideButton(AppInfo *app, XEvent *event, ButtonInfo button);
+Bool eventIsInsideButton(AppInfo *app, ButtonInfo button, XEvent *event);
 void handleButtonPress(AppInfo *app, XEvent *event);
 void handlePointerMotion(AppInfo *app, XEvent *event);
 
 void handleInputTimeout(XtPointer data, XtIntervalId *timerId);
 void cancelInputTimeout(AppInfo *app);
 
 #endif /* H_X11_SSH_ASKPASS */
