2011-01-31 13:24:57 +01:00
|
|
|
Index: x11-ssh-askpass.c
|
|
|
|
===================================================================
|
|
|
|
--- x11-ssh-askpass.c.orig
|
2007-01-07 17:26:05 +01:00
|
|
|
+++ x11-ssh-askpass.c
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -1301,7 +1301,7 @@ void handleKeyPress(AppInfo *app, XEvent
|
2007-01-07 17:26:05 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-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
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -1343,11 +1343,11 @@ void handleButtonPress(AppInfo *app, XEv
|
2007-01-07 17:26:05 +01:00
|
|
|
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);
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -1356,7 +1356,7 @@ void handleButtonPress(AppInfo *app, XEv
|
2007-01-07 17:26:05 +01:00
|
|
|
}
|
|
|
|
} 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) {
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -1365,7 +1365,7 @@ void handleButtonPress(AppInfo *app, XEv
|
2007-01-07 17:26:05 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} 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) {
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -1385,7 +1385,7 @@ void handlePointerMotion(AppInfo *app, X
|
2007-01-07 17:26:05 +01:00
|
|
|
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);
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -1397,7 +1397,7 @@ void handlePointerMotion(AppInfo *app, X
|
2007-01-07 17:26:05 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} 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);
|
2011-01-31 13:24:57 +01:00
|
|
|
Index: x11-ssh-askpass.h
|
|
|
|
===================================================================
|
|
|
|
--- x11-ssh-askpass.h.orig
|
2007-01-07 17:26:05 +01:00
|
|
|
+++ x11-ssh-askpass.h
|
2011-01-31 13:24:57 +01:00
|
|
|
@@ -258,7 +258,7 @@ void erasePassphrase(AppInfo *app);
|
2007-01-07 17:26:05 +01:00
|
|
|
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);
|
|
|
|
|