Fix remote desktop cursor cross-contamination across dialogs
The view-mode "forbidden" cursor was applied with SetClassLongPtr(GCLP_HCURSOR), which mutates the cursor for the whole window class instead of the single dialog instance. Opening a second remote-desktop dialog without remote control overwrote that shared class cursor with IDC_NO, so the already-controlled dialog also began showing the forbidden icon even though it remained operable. Move the view-mode cursor decision into OnSetCursor, which Windows routes per window, and remove the now-unused class-cursor assignments. Remote-control mode and the remote cursor-shape path are left unchanged. Also drop the dead m_hRemoteCursor member and the leftover GetIconInfo block (which leaked hbmMask/hbmColor in ScreenSpyDlg), plus the now-unreferenced m_bMouseTracking flag. Co-Authored-By: deepseek-v4-pro
This commit is contained in:
@@ -59,6 +59,7 @@ public:
|
||||
afx_msg void OnPaint();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
|
||||
|
||||
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
@@ -75,7 +76,6 @@ protected:
|
||||
HBITMAP m_BitmapHandle;
|
||||
LPVOID m_BitmapData_Full;
|
||||
LPBITMAPINFO m_BitmapInfor_Full;
|
||||
HCURSOR m_hRemoteCursor;
|
||||
CCursorInfo m_CursorInfo;
|
||||
BOOL m_bIsFirst;
|
||||
BOOL m_bIsCtrl;
|
||||
|
||||
Reference in New Issue
Block a user