mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Remove agent_schedule_callback().
This is another piece of the old 2003 attempt at async agent requests. Nothing ever calls this function (in particular, the new working version of async-agent doesn't need it). Remove it completely, and all its special-window-message implementations too. (If we _were_ still using this function, then it would surely be possible to fold it into the more recently introduced general toplevel-callback system, and get rid of all this single-use special code. But we're not, so removing it completely is even easier.) In particular, this system was the only reason why Windows Plink paid any attention to its message queue. So now I can make it call plain WaitForMultipleObjects instead of MsgWaitForMultipleObjects.
This commit is contained in:
@ -67,8 +67,7 @@
|
||||
|
||||
#define WM_IGNORE_CLIP (WM_APP + 2)
|
||||
#define WM_FULLSCR_ON_MAX (WM_APP + 3)
|
||||
#define WM_AGENT_CALLBACK (WM_APP + 4)
|
||||
#define WM_GOT_CLIPDATA (WM_APP + 6)
|
||||
#define WM_GOT_CLIPDATA (WM_APP + 4)
|
||||
|
||||
/* Needed for Chinese support and apparently not always defined. */
|
||||
#ifndef VK_PROCESSKEY
|
||||
@ -158,13 +157,6 @@ int vtmode;
|
||||
|
||||
static struct sesslist sesslist; /* for saved-session menu */
|
||||
|
||||
struct agent_callback {
|
||||
void (*callback)(void *, void *, int);
|
||||
void *callback_ctx;
|
||||
void *data;
|
||||
int len;
|
||||
};
|
||||
|
||||
#define FONT_NORMAL 0
|
||||
#define FONT_BOLD 1
|
||||
#define FONT_UNDERLINE 2
|
||||
@ -3339,13 +3331,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
term_invalidate(term);
|
||||
}
|
||||
break;
|
||||
case WM_AGENT_CALLBACK:
|
||||
{
|
||||
struct agent_callback *c = (struct agent_callback *)lParam;
|
||||
c->callback(c->callback_ctx, c->data, c->len);
|
||||
sfree(c);
|
||||
}
|
||||
return 0;
|
||||
case WM_GOT_CLIPDATA:
|
||||
process_clipdata((HGLOBAL)lParam, wParam);
|
||||
return 0;
|
||||
@ -5815,17 +5800,6 @@ static int win_seat_get_userpass_input(
|
||||
return ret;
|
||||
}
|
||||
|
||||
void agent_schedule_callback(void (*callback)(void *, void *, int),
|
||||
void *callback_ctx, void *data, int len)
|
||||
{
|
||||
struct agent_callback *c = snew(struct agent_callback);
|
||||
c->callback = callback;
|
||||
c->callback_ctx = callback_ctx;
|
||||
c->data = data;
|
||||
c->len = len;
|
||||
PostMessage(hwnd, WM_AGENT_CALLBACK, 0, (LPARAM)c);
|
||||
}
|
||||
|
||||
static bool win_seat_set_trust_status(Seat *seat, bool trusted)
|
||||
{
|
||||
term_set_trust_status(term, trusted);
|
||||
|
Reference in New Issue
Block a user