Patch to RDB's blinking cursor: make it configurable and by default

off. It's terribly distracting.

[originally from svn r423]
This commit is contained in:
Simon Tatham 2000-03-17 10:46:59 +00:00
Родитель 455cc2d387
Коммит 7d85289621
5 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -150,6 +150,7 @@ typedef struct {
int alt_f4; /* is it special? */
int alt_space; /* is it special? */
int ldisc_term;
int blink_cur;
/* Terminal options */
int savelines;
int dec_om;

Просмотреть файл

@ -1535,8 +1535,10 @@ static void do_paint (Context ctx, int may_optimise){
if (cursor_on) {
if (has_focus) {
if (blinker) cursor = ATTR_ACTCURS;
else cursor = 0;
if (blinker || !cfg.blink_cur)
cursor = ATTR_ACTCURS;
else
cursor = 0;
}
else
cursor = ATTR_PASCURS;

Просмотреть файл

@ -64,6 +64,7 @@
#define IDC1_ALTF4 1017
#define IDC1_ALTSPACE 1018
#define IDC1_LDISCTERM 1019
#define IDC1_BLINKCUR 1020
#define IDC2_WRAPMODE 1001
#define IDC2_DECOM 1002

Просмотреть файл

@ -125,6 +125,8 @@ BEGIN
IDC1_ALTSPACE, 3, 123, 162, 10
AUTOCHECKBOX "&Use local terminal line discipline",
IDC1_LDISCTERM, 3, 133, 162, 10
AUTOCHECKBOX "&Blinking cursor",
IDC1_BLINKCUR, 3, 143, 162, 10
END
IDD_PANEL2 DIALOG DISCARDABLE 6, 30, 168, 163

Просмотреть файл

@ -162,6 +162,7 @@ static void save_settings (char *section, int do_host) {
wppi (sesskey, "AltF4", cfg.alt_f4);
wppi (sesskey, "AltSpace", cfg.alt_space);
wppi (sesskey, "LdiscTerm", cfg.ldisc_term);
wppi (sesskey, "BlinkCur", cfg.blink_cur);
wppi (sesskey, "ScrollbackLines", cfg.savelines);
wppi (sesskey, "DECOriginMode", cfg.dec_om);
wppi (sesskey, "AutoWrapMode", cfg.wrap_mode);
@ -296,6 +297,7 @@ static void load_settings (char *section, int do_host) {
gppi (sesskey, "AltF4", 1, &cfg.alt_f4);
gppi (sesskey, "AltSpace", 0, &cfg.alt_space);
gppi (sesskey, "LdiscTerm", 0, &cfg.ldisc_term);
gppi (sesskey, "BlinkCur", 0, &cfg.blink_cur);
gppi (sesskey, "ScrollbackLines", 200, &cfg.savelines);
gppi (sesskey, "DECOriginMode", 0, &cfg.dec_om);
gppi (sesskey, "AutoWrapMode", 1, &cfg.wrap_mode);
@ -648,6 +650,7 @@ static int CALLBACK KeyboardProc (HWND hwnd, UINT msg,
CheckDlgButton (hwnd, IDC1_ALTF4, cfg.alt_f4);
CheckDlgButton (hwnd, IDC1_ALTSPACE, cfg.alt_space);
CheckDlgButton (hwnd, IDC1_LDISCTERM, cfg.ldisc_term);
CheckDlgButton (hwnd, IDC1_BLINKCUR, cfg.blink_cur);
break;
case WM_COMMAND:
if (HIWORD(wParam) == BN_CLICKED ||
@ -693,6 +696,11 @@ static int CALLBACK KeyboardProc (HWND hwnd, UINT msg,
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.ldisc_term = IsDlgButtonChecked (hwnd, IDC1_LDISCTERM);
break;
case IDC1_BLINKCUR:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.blink_cur = IsDlgButtonChecked (hwnd, IDC1_BLINKCUR);
break;
}
}
return GeneralPanelProc (hwnd, msg, wParam, lParam);