mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-21 22:28:37 -05:00
Robert de Bath has a better alternative to revs 1.47/48 [r582,r583];
back out those changes and commit the simpler version [originally from svn r625] [r582 == 147fca411cd62c134f8df662fe57fc55b5009c13] [r583 == 22f91a36040e2a7a9f66b5657800266d77d75c53]
This commit is contained in:
parent
1dc5147efb
commit
0fb760b16d
13
window.c
13
window.c
@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
#define WM_IGNORE_SIZE (WM_XUSER + 1)
|
#define WM_IGNORE_SIZE (WM_XUSER + 1)
|
||||||
#define WM_IGNORE_CLIP (WM_XUSER + 2)
|
#define WM_IGNORE_CLIP (WM_XUSER + 2)
|
||||||
#define WM_IGNORE_KEYMENU (WM_XUSER + 3)
|
|
||||||
|
|
||||||
static LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
|
static LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
|
||||||
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, unsigned char *output);
|
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, unsigned char *output);
|
||||||
@ -955,7 +954,6 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
|||||||
HDC hdc;
|
HDC hdc;
|
||||||
static int ignore_size = FALSE;
|
static int ignore_size = FALSE;
|
||||||
static int ignore_clip = FALSE;
|
static int ignore_clip = FALSE;
|
||||||
static int ignore_keymenu = TRUE;
|
|
||||||
static int just_reconfigged = FALSE;
|
static int just_reconfigged = FALSE;
|
||||||
static int resizing = FALSE;
|
static int resizing = FALSE;
|
||||||
|
|
||||||
@ -981,10 +979,6 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
|||||||
return 0;
|
return 0;
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */
|
switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */
|
||||||
case SC_KEYMENU:
|
|
||||||
if (ignore_keymenu)
|
|
||||||
return 0; /* don't put up system menu on Alt */
|
|
||||||
break;
|
|
||||||
case IDM_SHOWLOG:
|
case IDM_SHOWLOG:
|
||||||
showeventlog(hwnd);
|
showeventlog(hwnd);
|
||||||
break;
|
break;
|
||||||
@ -1214,9 +1208,6 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
|||||||
case WM_IGNORE_CLIP:
|
case WM_IGNORE_CLIP:
|
||||||
ignore_clip = wParam; /* don't panic on DESTROYCLIPBOARD */
|
ignore_clip = wParam; /* don't panic on DESTROYCLIPBOARD */
|
||||||
break;
|
break;
|
||||||
case WM_IGNORE_KEYMENU:
|
|
||||||
ignore_keymenu = wParam; /* do or don't ignore SC_KEYMENU */
|
|
||||||
break;
|
|
||||||
case WM_DESTROYCLIPBOARD:
|
case WM_DESTROYCLIPBOARD:
|
||||||
if (!ignore_clip)
|
if (!ignore_clip)
|
||||||
term_deselect();
|
term_deselect();
|
||||||
@ -1832,9 +1823,7 @@ static WPARAM compose_key = 0;
|
|||||||
}
|
}
|
||||||
if (left_alt && wParam == VK_SPACE && cfg.alt_space) {
|
if (left_alt && wParam == VK_SPACE && cfg.alt_space) {
|
||||||
|
|
||||||
SendMessage (hwnd, WM_IGNORE_KEYMENU, FALSE, 0);
|
|
||||||
SendMessage (hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0);
|
SendMessage (hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0);
|
||||||
SendMessage (hwnd, WM_IGNORE_KEYMENU, TRUE, 0);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2077,13 +2066,11 @@ static WPARAM compose_key = 0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This stops ALT press-release doing a 'COMMAND MENU' function */
|
/* This stops ALT press-release doing a 'COMMAND MENU' function */
|
||||||
#if 0
|
|
||||||
if (message == WM_SYSKEYUP && wParam == VK_MENU)
|
if (message == WM_SYSKEYUP && wParam == VK_MENU)
|
||||||
{
|
{
|
||||||
keystate[VK_MENU] = 0;
|
keystate[VK_MENU] = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user