int alt_space; /* is it special? */
int alt_only; /* is it special? */
int ldisc_term;
+ int alwaysontop;
int scroll_on_key;
int scroll_on_disp;
int compose_key;
write_setting_i (sesskey, "AltOnly", cfg->alt_only);
write_setting_i (sesskey, "ComposeKey", cfg->compose_key);
write_setting_i (sesskey, "LdiscTerm", cfg->ldisc_term);
+ write_setting_i (sesskey, "AlwaysOnTop", cfg->alwaysontop);
write_setting_i (sesskey, "BlinkCur", cfg->blink_cur);
write_setting_i (sesskey, "Beep", cfg->beep);
write_setting_i (sesskey, "ScrollbackLines", cfg->savelines);
gppi (sesskey, "AltOnly", 0, &cfg->alt_only);
gppi (sesskey, "ComposeKey", 0, &cfg->compose_key);
gppi (sesskey, "LdiscTerm", 0, &cfg->ldisc_term);
+ gppi (sesskey, "AlwaysOnTop", 0, &cfg->alwaysontop);
gppi (sesskey, "BlinkCur", 0, &cfg->blink_cur);
gppi (sesskey, "Beep", 1, &cfg->beep);
gppi (sesskey, "ScrollbackLines", 200, &cfg->savelines);
IDC_ALTONLY,
IDC_SCROLLKEY,
IDC_SCROLLDISP,
+ IDC_ALWAYSONTOP,
windowpanelend,
appearancepanelstart,
CheckDlgButton (hwnd, IDC_ALTONLY, cfg.alt_only);
CheckDlgButton (hwnd, IDC_COMPOSEKEY, cfg.compose_key);
CheckDlgButton (hwnd, IDC_LDISCTERM, cfg.ldisc_term);
+ CheckDlgButton (hwnd, IDC_ALWAYSONTOP, cfg.alwaysontop);
CheckDlgButton (hwnd, IDC_SCROLLKEY, cfg.scroll_on_key);
CheckDlgButton (hwnd, IDC_SCROLLDISP, cfg.scroll_on_disp);
checkbox(&cp, "&Beep enabled", IDC_BEEP);
checkbox(&cp, "Use background colour to &erase screen", IDC_BCE);
checkbox(&cp, "Enable bli&nking text", IDC_BLINKTEXT);
- checkbox(&cp, "&Use local terminal line discipline", IDC_LDISCTERM);
+ checkbox(&cp, "&Use local terminal line discipline", IDC_LDISCTERM);
endbox(&cp);
treeview_insert(&tvfaff, 0, "Terminal");
treeview_insert(&tvfaff, 1, "Keyboard");
}
- /* The Window panel. Accelerators used: [acgo] bsdkw4ylp */
+ /* The Window panel. Accelerators used: [acgo] bsdkw4ylpt */
{
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
checkbox(&cp, "Window closes on ALT-F&4", IDC_ALTF4);
checkbox(&cp, "S&ystem menu appears on ALT-Space", IDC_ALTSPACE);
checkbox(&cp, "System menu appears on A< alone", IDC_ALTONLY);
+ checkbox(&cp, "Ensure window is always on &top", IDC_ALWAYSONTOP);
endbox(&cp);
treeview_insert(&tvfaff, 0, "Window");
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.ldisc_term = IsDlgButtonChecked (hwnd, IDC_LDISCTERM);
break;
+ case IDC_ALWAYSONTOP:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED)
+ cfg.alwaysontop = IsDlgButtonChecked (hwnd, IDC_ALWAYSONTOP);
+ break;
case IDC_SCROLLKEY:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
{
int winmode = WS_OVERLAPPEDWINDOW|WS_VSCROLL;
- if (!cfg.scrollbar) winmode &= ~(WS_VSCROLL);
- if (cfg.locksize) winmode &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX);
- hwnd = CreateWindow (appname, appname,
- winmode,
- CW_USEDEFAULT, CW_USEDEFAULT,
- guess_width, guess_height,
- NULL, NULL, inst, NULL);
- }
+ int exwinmode = 0;
+ if (!cfg.scrollbar) winmode &= ~(WS_VSCROLL);
+ if (cfg.locksize) winmode &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX);
+ if (cfg.alwaysontop) exwinmode = WS_EX_TOPMOST;
+ hwnd = CreateWindowEx (exwinmode, appname, appname,
+ winmode, CW_USEDEFAULT, CW_USEDEFAULT,
+ guess_width, guess_height,
+ NULL, NULL, inst, NULL);
+ }
/*
* Initialise the fonts, simultaneously correcting the guesses
free(cl);
}
break;
- case IDM_RECONF:
+ case IDM_RECONF:
if (!do_reconfig(hwnd))
break;
just_reconfigged = TRUE;
logpal = NULL;
pal = NULL;
cfgtopalette();
- init_palette();
+ init_palette();
/* Enable or disable the scroll bar, etc */
{
LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
+ LONG nexflag, exflag = GetWindowLong(hwnd, GWL_EXSTYLE);
+
+ nexflag = exflag;
+ if (cfg.alwaysontop) {
+ nexflag = WS_EX_TOPMOST;
+ SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE);
+ } else {
+ nexflag = 0;
+ SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE);
+ }
nflg = flag;
if (cfg.scrollbar) nflg |= WS_VSCROLL;
else
nflg |= (WS_THICKFRAME|WS_MAXIMIZEBOX);
- if (nflg != flag)
+ if (nflg != flag || nexflag != exflag)
{
RECT cr, wr;
- SetWindowLong(hwnd, GWL_STYLE, nflg);
+ if (nflg != flag)
+ SetWindowLong(hwnd, GWL_STYLE, nflg);
+ if (nexflag != exflag)
+ SetWindowLong(hwnd, GWL_EXSTYLE, nexflag);
+
SendMessage (hwnd, WM_IGNORE_SIZE, 0, 0);
SetWindowPos(hwnd, NULL, 0,0,0,0,
SWP_NOACTIVATE|SWP_NOCOPYBITS|
- SWP_NOMOVE|SWP_NOSIZE| SWP_NOZORDER|
+ SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|
SWP_FRAMECHANGED);
GetWindowRect (hwnd, &wr);
SetWindowText (hwnd,
cfg.win_name_always ? window_name : icon_name);
}
- break;
+ break;
case IDM_CLRSB:
term_clrsb();
break;