~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve buffer handling in Windows sk_getaddr() -- we were passing
[sgt/putty]
/
windows
/
window.c
diff --git
a/windows/window.c
b/windows/window.c
index
670a1ac
..
8068bc3
100644
(file)
--- a/
windows/window.c
+++ b/
windows/window.c
@@
-110,7
+110,6
@@
static LPARAM pend_netevent_lParam = 0;
static void enact_pending_netevent(void);
static void flash_window(int mode);
static void sys_cursor_update(void);
static void enact_pending_netevent(void);
static void flash_window(int mode);
static void sys_cursor_update(void);
-static int is_shift_pressed(void);
static int get_fullscreen_rect(RECT * ss);
static int caret_x = -1, caret_y = -1;
static int get_fullscreen_rect(RECT * ss);
static int caret_x = -1, caret_y = -1;
@@
-636,7
+635,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
guess_height = extra_height + font_height * cfg.height;
{
RECT r;
guess_height = extra_height + font_height * cfg.height;
{
RECT r;
-
get_fullscreen_rect(&r);
+ get_fullscreen_rect(&r);
if (guess_width > r.right - r.left)
guess_width = r.right - r.left;
if (guess_height > r.bottom - r.top)
if (guess_width > r.right - r.left)
guess_width = r.right - r.left;
if (guess_height > r.bottom - r.top)
@@
-912,6
+911,8
@@
static void update_savedsess_menu(void)
AppendMenu(savedsess_menu, MF_ENABLED,
IDM_SAVED_MIN + (i-1)*MENU_SAVED_STEP,
sesslist.sessions[i]);
AppendMenu(savedsess_menu, MF_ENABLED,
IDM_SAVED_MIN + (i-1)*MENU_SAVED_STEP,
sesslist.sessions[i]);
+ if (sesslist.nsessions <= 1)
+ AppendMenu(savedsess_menu, MF_GRAYED, IDM_SAVED_MIN, "(No sessions)");
}
/*
}
/*
@@
-1907,17
+1908,6
@@
static int is_alt_pressed(void)
return FALSE;
}
return FALSE;
}
-static int is_shift_pressed(void)
-{
- BYTE keystate[256];
- int r = GetKeyboardState(keystate);
- if (!r)
- return FALSE;
- if (keystate[VK_SHIFT] & 0x80)
- return TRUE;
- return FALSE;
-}
-
static int resizing;
void notify_remote_exit(void *fe)
static int resizing;
void notify_remote_exit(void *fe)