summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--justtabs/justtabs.cpp2
-rw-r--r--justtabs/win.cpp16
2 files changed, 16 insertions, 2 deletions
diff --git a/justtabs/justtabs.cpp b/justtabs/justtabs.cpp
index 7f266b4..6b76e8d 100644
--- a/justtabs/justtabs.cpp
+++ b/justtabs/justtabs.cpp
@@ -21,7 +21,7 @@ typedef LRESULT (CALLBACK *WNDPROC)(HWND, UINT, WPARAM, LPARAM);
PLUGININFO pluginInfo={
sizeof(PLUGININFO),
MODULE,
- PLUGIN_MAKE_VERSION(0,0,2,1),
+ PLUGIN_MAKE_VERSION(0,0,2,2),
"Put SRMM windows into a single frame",
"Scott Ellis",
"mail@scottellis.com.au",
diff --git a/justtabs/win.cpp b/justtabs/win.cpp
index b4a0461..e2f286c 100644
--- a/justtabs/win.cpp
+++ b/justtabs/win.cpp
@@ -336,7 +336,21 @@ BOOL CALLBACK FrameProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
Utils_SaveWindowPosition(hwnd, 0, MODULE, "MainWin");
active_window = 0;
SetFocus(tab_ctrl); // crash if focus is in typing window when srmm closed (EN_KILLFOCUS command, null dat)
- WindowList_Broadcast(window_list, WM_CLOSE, 0, 0);
+
+ // clost windows in reverse order (for e.g. 'last contact')
+ int l, i;
+ HWND hwndMsg;
+ TCITEM tci;
+ l = TabCtrl_GetItemCount(tab_ctrl);
+ for (i = l - 1; i >= 0; --i) {
+ tci.mask = TCIF_PARAM;
+ TabCtrl_GetItem(tab_ctrl, i, &tci);
+ hwndMsg = ((TabData *)tci.lParam)->hwndMsg;
+
+ SendMessage(hwndMsg, WM_CLOSE, 0, 0);
+ }
+ //WindowList_Broadcast(window_list, WM_CLOSE, 0, 0);
+
ShowWindow(hwnd, SW_HIDE);
}
return TRUE;