Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b8fcc4a2
Commit
b8fcc4a2
authored
Feb 23, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Feb 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Move end-of-drag handling to a separate function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
82b140f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
51 deletions
+34
-51
ole2.c
dlls/ole32/ole2.c
+34
-51
No files found.
dlls/ole32/ole2.c
View file @
b8fcc4a2
...
...
@@ -2211,6 +2211,38 @@ static void drag_enter( TrackerWindowInfo *info, HWND new_target )
}
}
static
void
drag_end
(
TrackerWindowInfo
*
info
)
{
HRESULT
hr
;
info
->
trackingDone
=
TRUE
;
ReleaseCapture
();
if
(
info
->
curDragTarget
)
{
if
(
info
->
returnValue
==
DRAGDROP_S_DROP
&&
*
info
->
pdwEffect
!=
DROPEFFECT_NONE
)
{
*
info
->
pdwEffect
=
info
->
dwOKEffect
;
hr
=
IDropTarget_Drop
(
info
->
curDragTarget
,
info
->
dataObject
,
info
->
dwKeyState
,
info
->
curMousePos
,
info
->
pdwEffect
);
*
info
->
pdwEffect
&=
info
->
dwOKEffect
;
if
(
FAILED
(
hr
))
info
->
returnValue
=
hr
;
}
else
{
IDropTarget_DragLeave
(
info
->
curDragTarget
);
*
info
->
pdwEffect
=
DROPEFFECT_NONE
;
}
IDropTarget_Release
(
info
->
curDragTarget
);
info
->
curDragTarget
=
NULL
;
}
else
*
info
->
pdwEffect
=
DROPEFFECT_NONE
;
}
static
HRESULT
give_feedback
(
TrackerWindowInfo
*
info
)
{
HRESULT
hr
;
...
...
@@ -2253,7 +2285,6 @@ static HRESULT give_feedback( TrackerWindowInfo *info )
static
void
OLEDD_TrackStateChange
(
TrackerWindowInfo
*
trackerInfo
)
{
HWND
hwndNewTarget
=
0
;
HRESULT
hr
=
S_OK
;
POINT
pt
;
/*
...
...
@@ -2304,56 +2335,8 @@ static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
* All the return valued will stop the operation except the S_OK
* return value.
*/
if
(
trackerInfo
->
returnValue
!=
S_OK
)
{
/*
* Make sure the message loop in DoDragDrop stops
*/
trackerInfo
->
trackingDone
=
TRUE
;
/*
* Release the mouse in case the drop target decides to show a popup
* or a menu or something.
*/
ReleaseCapture
();
/*
* If we end-up over a target, drop the object in the target or
* inform the target that the operation was cancelled.
*/
if
(
trackerInfo
->
curDragTarget
)
{
switch
(
trackerInfo
->
returnValue
)
{
/*
* If the source wants us to complete the operation, we tell
* the drop target that we just dropped the object in it.
*/
case
DRAGDROP_S_DROP
:
if
(
*
trackerInfo
->
pdwEffect
!=
DROPEFFECT_NONE
)
{
hr
=
IDropTarget_Drop
(
trackerInfo
->
curDragTarget
,
trackerInfo
->
dataObject
,
trackerInfo
->
dwKeyState
,
trackerInfo
->
curMousePos
,
trackerInfo
->
pdwEffect
);
if
(
FAILED
(
hr
))
trackerInfo
->
returnValue
=
hr
;
}
else
IDropTarget_DragLeave
(
trackerInfo
->
curDragTarget
);
break
;
/*
* If the source told us that we should cancel, fool the drop
* target by telling it that the mouse left its window.
* Also set the drop effect to "NONE" in case the application
* ignores the result of DoDragDrop.
*/
case
DRAGDROP_S_CANCEL
:
IDropTarget_DragLeave
(
trackerInfo
->
curDragTarget
);
*
trackerInfo
->
pdwEffect
=
DROPEFFECT_NONE
;
break
;
}
}
}
if
(
trackerInfo
->
returnValue
!=
S_OK
)
drag_end
(
trackerInfo
);
}
/***
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment