[kpkoch - Tue Aug 7 22:19:05 2007]: > @@ -383,6 +424,8 @@ > > /* layout control */ > case KHUI_ACTION_LAYOUT_MINI: > + KillTimer(hwnd, MW_RESIZE_TIMER); > + main_wnd_save_sizepos(hwnd); > if (khm_main_wnd_mode == KHM_MAIN_WND_MINI) { > khm_set_main_window_mode(KHM_MAIN_WND_NORMAL); > } else { This is not the only place that the main window mode is set. The mode will also be implicitly switched if the main window is in basic mode and the user requests a view that requires the advanced mode. Ideally, killing the timer and saving the window position should be performed in khm_set_main_window_mode(). This allows the rest of the code to call this function without having to worry about saving the window position, which is good because it's already being called from multiple places. Note that khm_set_main_window_mode() is called once before the main window is actually created. Also, main_wnd_save_sizepos() relies on khm_main_wnd_mode. So, killing the timer and saving the position should happen before khm_main_wnd_mode is modified if khm_hwnd_main is non-NULL. - Asanka Herath Secure Endpoints Inc.