diff options
-rw-r--r-- | include/m_chat_int.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 12 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 9 |
3 files changed, 12 insertions, 10 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index f366ca4052..af4f137e07 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -440,6 +440,7 @@ public: int m_iLogFilterFlags;
bool m_bFilterEnabled, m_bNicklistEnabled;
bool m_bFGSet, m_bBGSet;
+ bool m_bInMenu;
COLORREF m_iFG, m_iBG;
void ClearLog();
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 020404d9ae..0ea68c5da6 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -910,7 +910,6 @@ void CSrmmWindow::MessageDialogResize(int w, int h) LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
{
- static BOOL inMenu = FALSE;
switch (msg) {
case WM_MEASUREITEM:
MeasureMenuItem(wParam, lParam);
@@ -919,13 +918,6 @@ LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) case WM_DRAWITEM:
return DrawMenuItem(wParam, lParam);
- case WM_SETCURSOR:
- if (inMenu) {
- SetCursor(LoadCursor(nullptr, IDC_ARROW));
- return TRUE;
- }
- break;
-
case WM_CONTEXTMENU:
HMENU hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
HMENU hSubMenu = GetSubMenu(hMenu, 0);
@@ -957,9 +949,9 @@ LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) }
else ModifyMenu(hSubMenu, 5, MF_STRING | MF_GRAYED | MF_BYPOSITION, 5, TranslateT("No word to look up"));
- inMenu = TRUE;
+ m_bInMenu = true;
int uID = TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, m_log.GetHwnd(), nullptr);
- inMenu = FALSE;
+ m_bInMenu = false;
switch (uID) {
case IDM_COPY:
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 76d653ad52..6624d07f70 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -160,6 +160,13 @@ LRESULT CSrmmBaseDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) } break; + case WM_SETCURSOR: + if (m_bInMenu) { + SetCursor(LoadCursor(nullptr, IDC_ARROW)); + return TRUE; + } + break; + case WM_KEYDOWN: case WM_SYSKEYDOWN: if (!(GetKeyState(VK_RMENU) & 0x8000)) { @@ -231,7 +238,9 @@ LRESULT CSrmmBaseDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) CHARRANGE all = { 0, -1 }; HMENU hMenu = GetSubMenu(g_hMenu, 1); + m_bInMenu = true; UINT uID = Chat_CreateGCMenu(m_log.GetHwnd(), hMenu, pt, m_si, nullptr, pszWord); + m_bInMenu = false; switch (uID) { case 0: PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0); |