projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bell panel docs.
[u/mdw/putty]
/
window.c
diff --git
a/window.c
b/window.c
index
905c43e
..
546a917
100644
(file)
--- a/
window.c
+++ b/
window.c
@@
-574,6
+574,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
* Finally show the window!
*/
ShowWindow(hwnd, show);
* Finally show the window!
*/
ShowWindow(hwnd, show);
+ SetForegroundWindow(hwnd);
/*
* Open the initial log file if there is one.
/*
* Open the initial log file if there is one.
@@
-1591,11
+1592,11
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
if (wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) {
Mouse_Button b;
if (wParam & MK_LBUTTON)
if (wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) {
Mouse_Button b;
if (wParam & MK_LBUTTON)
- b = MBT_
SELEC
T;
+ b = MBT_
LEF
T;
else if (wParam & MK_MBUTTON)
else if (wParam & MK_MBUTTON)
- b =
cfg.mouse_is_xterm ? MBT_PASTE : MBT_EXTEND
;
+ b =
MBT_MIDDLE
;
else
else
- b =
cfg.mouse_is_xterm ? MBT_EXTEND : MBT_PASTE
;
+ b =
MBT_RIGHT
;
term_mouse(b, MA_DRAG, TO_CHR_X(X_POS(lParam)),
TO_CHR_Y(Y_POS(lParam)), wParam & MK_SHIFT,
wParam & MK_CONTROL);
term_mouse(b, MA_DRAG, TO_CHR_X(X_POS(lParam)),
TO_CHR_Y(Y_POS(lParam)), wParam & MK_SHIFT,
wParam & MK_CONTROL);
@@
-2461,8
+2462,7
@@
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
return 0;
}
if (wParam == VK_INSERT && shift_state == 1) {
return 0;
}
if (wParam == VK_INSERT && shift_state == 1) {
- term_mouse(MBT_PASTE, MA_CLICK, 0, 0, 0, 0);
- term_mouse(MBT_PASTE, MA_RELEASE, 0, 0, 0, 0);
+ term_do_paste();
return 0;
}
if (left_alt && wParam == VK_F4 && cfg.alt_f4) {
return 0;
}
if (left_alt && wParam == VK_F4 && cfg.alt_f4) {
@@
-2882,7
+2882,7
@@
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
#ifdef SHOW_TOASCII_RESULT
if (r == 1 && !key_down) {
if (alt_sum) {
#ifdef SHOW_TOASCII_RESULT
if (r == 1 && !key_down) {
if (alt_sum) {
- if (utf || dbcs_screenfont)
+ if (
in_
utf || dbcs_screenfont)
debug((", (U+%04x)", alt_sum));
else
debug((", LCH(%d)", alt_sum));
debug((", (U+%04x)", alt_sum));
else
debug((", LCH(%d)", alt_sum));
@@
-2926,7
+2926,7
@@
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
if (!key_down) {
if (alt_sum) {
if (!key_down) {
if (alt_sum) {
- if (utf || dbcs_screenfont) {
+ if (
in_
utf || dbcs_screenfont) {
keybuf = alt_sum;
luni_send(&keybuf, 1);
} else {
keybuf = alt_sum;
luni_send(&keybuf, 1);
} else {
@@
-2953,7
+2953,7
@@
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
if (!left_alt)
keys[0] = 0;
/* If we will be using alt_sum fix the 256s */
if (!left_alt)
keys[0] = 0;
/* If we will be using alt_sum fix the 256s */
- else if (keys[0] && (utf || dbcs_screenfont))
+ else if (keys[0] && (
in_
utf || dbcs_screenfont))
keys[0] = 10;
}
keys[0] = 10;
}