X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/f43e4b678f0b7aa847a3eeb3fab536058710d69f..32f46b5c30131a9ba5bbadd28da6425434aca47f:/windows/window.c diff --git a/windows/window.c b/windows/window.c index 3ff018b1..05d5ccc4 100644 --- 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 int is_shift_pressed(void); static int get_fullscreen_rect(RECT * ss); static int caret_x = -1, caret_y = -1; @@ -1909,17 +1908,6 @@ static int is_alt_pressed(void) 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) @@ -5053,16 +5041,12 @@ void modalfatalbox(char *fmt, ...) cleanup_exit(1); } -typedef BOOL (WINAPI *p_FlashWindowEx_t)(PFLASHWINFO); -static p_FlashWindowEx_t p_FlashWindowEx = NULL; +DECL_WINDOWS_FUNCTION(static, BOOL, FlashWindowEx, (PFLASHWINFO)); static void init_flashwindow(void) { HMODULE user32_module = LoadLibrary("USER32.DLL"); - if (user32_module) { - p_FlashWindowEx = (p_FlashWindowEx_t) - GetProcAddress(user32_module, "FlashWindowEx"); - } + GET_WINDOWS_FUNCTION(user32_module, FlashWindowEx); } static BOOL flash_window_ex(DWORD dwFlags, UINT uCount, DWORD dwTimeout)