Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #20: initialize puttyTrayFlashIcon properly
  • Loading branch information
stfnm authored and FauxFaux committed Aug 7, 2013
1 parent 5473d3d commit ea40a94
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions windows/window.c
Expand Up @@ -5832,7 +5832,6 @@ static void flash_window_timer(void *ctx, unsigned long now)
static void flash_window(int mode)
{
int beep_ind = conf_get_int(conf, CONF_beep_ind);
HINSTANCE inst;

if ((mode == 0) || (beep_ind == B_IND_DISABLED)) {
/* stop */
Expand All @@ -5841,8 +5840,6 @@ static void flash_window(int mode)
flashing = 0;

if (puttyTrayVisible) {
inst = (HINSTANCE)GetWindowLong(hwnd, GWL_HINSTANCE);

puttyTrayFlash = FALSE;
puttyTray.hIcon = puttyTrayFlashIcon;
taskbar_addicon(conf_get_int(conf, CONF_win_name_always) ? window_name : icon_name, TRUE);
Expand All @@ -5854,6 +5851,7 @@ static void flash_window(int mode)
/* start */
if (!flashing) {
flashing = 1;
puttyTrayFlashIcon = puttyTray.hIcon;
FlashWindow(hwnd, TRUE);
next_flash = schedule_timer(450, flash_window_timer, hwnd);

Expand All @@ -5875,9 +5873,7 @@ static void flash_window(int mode)
puttyTray.hIcon = NULL;
taskbar_addicon(conf_get_int(conf, CONF_win_name_always) ? window_name : icon_name, TRUE);
} else {
inst = (HINSTANCE)GetWindowLong(hwnd, GWL_HINSTANCE);
puttyTrayFlash = FALSE;

puttyTray.hIcon = puttyTrayFlashIcon;
taskbar_addicon(conf_get_int(conf, CONF_win_name_always) ? window_name : icon_name, TRUE);
}
Expand Down

0 comments on commit ea40a94

Please sign in to comment.