Browse Source

use timer to show ditto when the tray notification window is shown

sabrogden 8 years ago
parent
commit
ebae3a9b18
2 changed files with 9 additions and 1 deletions
  1. 8 1
      MainFrm.cpp
  2. 1 0
      MainFrm.h

+ 8 - 1
MainFrm.cpp

@@ -179,7 +179,7 @@ LRESULT CMainFrame::OnTrayNotification(WPARAM wParam, LPARAM lParam)
 	//click on balloon
 	if (lParam == 0x405)
 	{
-		m_quickPaste.ShowQPasteWnd(this, false, false, FALSE);
+		SetTimer(DELAYED_SHOW_DITTO_TIMER, 100, NULL);		
 	}
 	
 	m_trayIcon.OnTrayNotification(wParam, lParam);
@@ -764,6 +764,13 @@ void CMainFrame::OnTimer(UINT_PTR nIDEvent)
 				m_quickPaste.OnScreenResolutionChange();
 			}
 			break;
+		case DELAYED_SHOW_DITTO_TIMER:
+		{
+			KillTimer(DELAYED_SHOW_DITTO_TIMER);
+			m_quickPaste.ShowQPasteWnd(this, false, false, FALSE);
+		}
+		break;
+
     }
 
     CFrameWnd::OnTimer(nIDEvent);

+ 1 - 0
MainFrm.h

@@ -22,6 +22,7 @@
 #define GROUP_DOUBLE_CLICK				13
 #define CLOSE_POPUP_MSG_WND				14
 #define SCREEN_RESOLUTION_CHANGED		15
+#define DELAYED_SHOW_DITTO_TIMER		16
 
 class CMainFrame: public CFrameWnd
 {