int localecho;
int localedit;
int alwaysontop;
+ int fullscreenonaltenter;
int scroll_on_key;
int scroll_on_disp;
int compose_key;
write_setting_i(sesskey, "LocalEdit", cfg->localedit);
write_setting_s(sesskey, "Answerback", cfg->answerback);
write_setting_i(sesskey, "AlwaysOnTop", cfg->alwaysontop);
+ write_setting_i(sesskey, "FullScreenOnAltEnter", cfg->fullscreenonaltenter);
write_setting_i(sesskey, "HideMousePtr", cfg->hide_mouseptr);
write_setting_i(sesskey, "SunkenEdge", cfg->sunken_edge);
write_setting_i(sesskey, "CurType", cfg->cursor_type);
gpps(sesskey, "Answerback", "PuTTY", cfg->answerback,
sizeof(cfg->answerback));
gppi(sesskey, "AlwaysOnTop", 0, &cfg->alwaysontop);
+ gppi(sesskey, "FullScreenOnAltEnter", 0, &cfg->fullscreenonaltenter);
gppi(sesskey, "HideMousePtr", 0, &cfg->hide_mouseptr);
gppi(sesskey, "SunkenEdge", 0, &cfg->sunken_edge);
gppi(sesskey, "CurType", 0, &cfg->cursor_type);
IDC_SCROLLKEY,
IDC_SCROLLDISP,
IDC_ALWAYSONTOP,
+ IDC_FULLSCREENONALTENTER,
windowpanelend,
appearancepanelstart,
cfg.localedit == LD_YES ? IDC_EDITYES : IDC_EDITNO);
SetDlgItemText(hwnd, IDC_ANSWEREDIT, cfg.answerback);
CheckDlgButton(hwnd, IDC_ALWAYSONTOP, cfg.alwaysontop);
+ CheckDlgButton(hwnd, IDC_FULLSCREENONALTENTER, cfg.fullscreenonaltenter);
CheckDlgButton(hwnd, IDC_SCROLLKEY, cfg.scroll_on_key);
CheckDlgButton(hwnd, IDC_SCROLLDISP, cfg.scroll_on_disp);
}
if (panel == windowpanelstart) {
- /* The Window panel. Accelerators used: [acgo] rmz sdkp w4ylt */
+ /* The Window panel. Accelerators used: [acgo] rmz sdkp w4ylt f */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Options controlling PuTTY's window",
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);
+ checkbox(&cp, "&Full screen on Alt-Enter", IDC_FULLSCREENONALTENTER);
endbox(&cp);
}
}
if (panel == translationpanelstart) {
- /* The Translation panel. Accelerators used: [acgo] xbep t s */
+ /* The Translation panel. Accelerators used: [acgo] rxbepu */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Options controlling character set translation",
IDC_TITLE_TRANSLATION);
beginbox(&cp, "Character set translation on received data",
IDC_BOX_TRANSLATION2);
- combobox(&cp, "Received data assumed to be in which character set:",
+ combobox(&cp, "&Received data assumed to be in which character set:",
IDC_CODEPAGESTATIC, IDC_CODEPAGE);
endbox(&cp);
beginbox(&cp, "Adjust how PuTTY displays line drawing characters",
}
if (panel == sshpanelstart) {
- /* The SSH panel. Accelerators used: [acgo] r pe12i sud */
+ /* The SSH panel. Accelerators used: [acgo] r pe12i s */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
if (dlgtype == 0) {
cfg.alwaysontop =
IsDlgButtonChecked(hwnd, IDC_ALWAYSONTOP);
break;
+ case IDC_FULLSCREENONALTENTER:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED)
+ cfg.fullscreenonaltenter =
+ IsDlgButtonChecked(hwnd, IDC_FULLSCREENONALTENTER);
+ break;
case IDC_SCROLLKEY:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
static void another_font(int);
static void deinit_fonts(void);
-static int extra_width, extra_height;
+static int full_screen = 0, extra_width, extra_height;
+static LONG old_wind_style;
+static WINDOWPLACEMENT old_wind_placement;
static int pending_netevent = 0;
static WPARAM pend_netevent_wParam = 0;
static LPARAM pend_netevent_lParam = 0;
static void enact_pending_netevent(void);
static void flash_window(int mode);
+static void flip_full_screen(void);
static time_t last_movement = 0;
SendMessage(hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0);
return -1;
}
+ if (left_alt && wParam == VK_RETURN && cfg.fullscreenonaltenter) {
+ flip_full_screen();
+ return -1;
+ }
/* Control-Numlock for app-keypad mode switch */
if (wParam == VK_PAUSE && shift_state == 2) {
app_keypad_keys ^= 1;
flash_window(2); /* start */
}
}
+
+/*
+ * Toggle full screen mode. Thanks to cwis@nerim.fr for the
+ * implementation.
+ */
+static void flip_full_screen(void)
+{
+ if (!full_screen) {
+ int cx, cy;
+
+ cx = GetSystemMetrics(SM_CXSCREEN);
+ cy = GetSystemMetrics(SM_CYSCREEN);
+ GetWindowPlacement(hwnd, &old_wind_placement);
+ old_wind_style = GetWindowLong(hwnd, GWL_STYLE);
+ SetWindowLong(hwnd, GWL_STYLE,
+ old_wind_style & ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME));
+ SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW);
+ full_screen = 1;
+ } else {
+ SetWindowLong(hwnd, GWL_STYLE, old_wind_style);
+ SetWindowPlacement(hwnd,&old_wind_placement);
+ full_screen = 0;
+ }
+}