Commit 3864956e authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Clear data structure after dragging.

- WM_SETCURSOR does not need to be handled as it is not sent whilst the window is captured. - Make uDragListMessage non-static so that we can re-use it elsewhere.
parent 79dcdd0a
...@@ -74,7 +74,7 @@ typedef struct _DRAGLISTDATA ...@@ -74,7 +74,7 @@ typedef struct _DRAGLISTDATA
RECT last_drag_icon_rect; RECT last_drag_icon_rect;
} DRAGLISTDATA; } DRAGLISTDATA;
static UINT uDragListMessage = 0; /* registered window message code */ UINT uDragListMessage = 0; /* registered window message code */
static DWORD dwLastScrollTime = 0; static DWORD dwLastScrollTime = 0;
static HICON hDragArrow = NULL; static HICON hDragArrow = NULL;
...@@ -99,9 +99,10 @@ static inline void DragList_EndDrag(HWND hwnd, DRAGLISTDATA * data) ...@@ -99,9 +99,10 @@ static inline void DragList_EndDrag(HWND hwnd, DRAGLISTDATA * data)
{ {
KillTimer(hwnd, DRAGLIST_TIMERID); KillTimer(hwnd, DRAGLIST_TIMERID);
ReleaseCapture(); ReleaseCapture();
data->dragging = FALSE;
/* clear any drag insert icon present */ /* clear any drag insert icon present */
InvalidateRect(GetParent(hwnd), &data->last_drag_icon_rect, TRUE); InvalidateRect(GetParent(hwnd), &data->last_drag_icon_rect, TRUE);
/* clear data for next use */
memset(data, 0, sizeof(*data));
} }
/*********************************************************************** /***********************************************************************
...@@ -118,8 +119,6 @@ DragList_SubclassWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, ...@@ -118,8 +119,6 @@ DragList_SubclassWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
{ {
case WM_LBUTTONDOWN: case WM_LBUTTONDOWN:
SetFocus(hwnd); SetFocus(hwnd);
data->cursor = NULL;
SetRectEmpty(&data->last_drag_icon_rect);
data->dragging = DragList_Notify(hwnd, DL_BEGINDRAG); data->dragging = DragList_Notify(hwnd, DL_BEGINDRAG);
if (data->dragging) if (data->dragging)
{ {
...@@ -183,15 +182,6 @@ DragList_SubclassWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, ...@@ -183,15 +182,6 @@ DragList_SubclassWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
} }
break; break;
case WM_SETCURSOR:
/* if app has told us to set a cursor then do so */
if (data->dragging && data->cursor)
{
SetCursor(data->cursor);
return TRUE;
}
break;
case WM_GETDLGCODE: case WM_GETDLGCODE:
/* tell dialog boxes that we want to receive WM_KEYDOWN events /* tell dialog boxes that we want to receive WM_KEYDOWN events
* for keys like VK_ESCAPE */ * for keys like VK_ESCAPE */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment