Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a5d73ae4
Commit
a5d73ae4
authored
Jan 19, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Return result through NtCallbackReturn for the drag and drop callbacks.
parent
5cd38614
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
11 deletions
+27
-11
dllmain.c
dlls/winemac.drv/dllmain.c
+6
-4
dragdrop.c
dlls/winemac.drv/dragdrop.c
+5
-4
event.c
dlls/winemac.drv/event.c
+16
-3
No files found.
dlls/winemac.drv/dllmain.c
View file @
a5d73ae4
...
...
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "macdrv_dll.h"
#include "macdrv_res.h"
#include "shellapi.h"
...
...
@@ -209,7 +211,7 @@ NTSTATUS WINAPI macdrv_app_quit_request(void *arg, ULONG size)
}
/* quit_callback() will clean up qi */
return
0
;
return
STATUS_SUCCESS
;
fail:
WARN
(
"failed to allocate window list
\n
"
);
...
...
@@ -219,7 +221,7 @@ fail:
HeapFree
(
GetProcessHeap
(),
0
,
qi
);
}
quit_reply
(
FALSE
);
return
0
;
return
STATUS_SUCCESS
;
}
/***********************************************************************
...
...
@@ -259,13 +261,13 @@ static NTSTATUS WINAPI macdrv_app_icon(void *arg, ULONG size)
if
(
!
res_info
)
{
WARN
(
"found no RT_GROUP_ICON resource
\n
"
);
return
0
;
return
STATUS_SUCCESS
;
}
if
(
!
(
res_data
=
LoadResource
(
NULL
,
res_info
)))
{
WARN
(
"failed to load RT_GROUP_ICON resource
\n
"
);
return
0
;
return
STATUS_SUCCESS
;
}
if
(
!
(
icon_dir
=
LockResource
(
res_data
)))
...
...
dlls/winemac.drv/dragdrop.c
View file @
a5d73ae4
...
...
@@ -499,7 +499,7 @@ NTSTATUS WINAPI macdrv_dnd_query_drop(void *arg, ULONG size)
if
(
active_data_object
)
IDataObject_Release
(
active_data_object
);
active_data_object
=
NULL
;
last_droptarget_hwnd
=
NULL
;
return
ret
;
return
NtCallbackReturn
(
&
ret
,
sizeof
(
ret
),
STATUS_SUCCESS
)
;
}
...
...
@@ -511,6 +511,7 @@ NTSTATUS WINAPI macdrv_dnd_query_exited(void *arg, ULONG size)
struct
dnd_query_exited_params
*
params
=
arg
;
HWND
hwnd
=
UlongToHandle
(
params
->
hwnd
);
IDropTarget
*
droptarget
;
BOOL
ret
=
TRUE
;
TRACE
(
"win %p
\n
"
,
hwnd
);
...
...
@@ -529,8 +530,7 @@ NTSTATUS WINAPI macdrv_dnd_query_exited(void *arg, ULONG size)
if
(
active_data_object
)
IDataObject_Release
(
active_data_object
);
active_data_object
=
NULL
;
last_droptarget_hwnd
=
NULL
;
return
TRUE
;
return
NtCallbackReturn
(
&
ret
,
sizeof
(
ret
),
STATUS_SUCCESS
);
}
...
...
@@ -643,5 +643,6 @@ NTSTATUS WINAPI macdrv_dnd_query_drag(void *arg, ULONG size)
}
TRACE
(
" -> %s
\n
"
,
ret
?
"TRUE"
:
"FALSE"
);
return
ret
?
effect
:
0
;
if
(
!
ret
)
effect
=
0
;
return
NtCallbackReturn
(
&
effect
,
sizeof
(
effect
),
STATUS_SUCCESS
);
}
dlls/winemac.drv/event.c
View file @
a5d73ae4
...
...
@@ -227,6 +227,8 @@ static BOOL query_drag_drop(macdrv_query *query)
HWND
hwnd
=
macdrv_get_window_hwnd
(
query
->
window
);
struct
macdrv_win_data
*
data
=
get_win_data
(
hwnd
);
struct
dnd_query_drop_params
params
;
void
*
ret_ptr
;
ULONG
ret_len
;
if
(
!
data
)
{
...
...
@@ -240,7 +242,9 @@ static BOOL query_drag_drop(macdrv_query *query)
params
.
y
=
query
->
drag_drop
.
y
+
data
->
whole_rect
.
top
;
params
.
handle
=
(
UINT_PTR
)
query
->
drag_drop
.
pasteboard
;
release_win_data
(
data
);
return
macdrv_client_func
(
client_func_dnd_query_drop
,
&
params
,
sizeof
(
params
));
if
(
KeUserModeCallback
(
client_func_dnd_query_drop
,
&
params
,
sizeof
(
params
),
&
ret_ptr
,
&
ret_len
))
return
FALSE
;
return
*
(
BOOL
*
)
ret_ptr
;
}
/**************************************************************************
...
...
@@ -249,8 +253,13 @@ static BOOL query_drag_drop(macdrv_query *query)
static
BOOL
query_drag_exited
(
macdrv_query
*
query
)
{
struct
dnd_query_exited_params
params
;
void
*
ret_ptr
;
ULONG
ret_len
;
params
.
hwnd
=
HandleToUlong
(
macdrv_get_window_hwnd
(
query
->
window
));
return
macdrv_client_func
(
client_func_dnd_query_exited
,
&
params
,
sizeof
(
params
));
if
(
KeUserModeCallback
(
client_func_dnd_query_exited
,
&
params
,
sizeof
(
params
),
&
ret_ptr
,
&
ret_len
))
return
FALSE
;
return
*
(
BOOL
*
)
ret_ptr
;
}
...
...
@@ -262,6 +271,8 @@ static BOOL query_drag_operation(macdrv_query *query)
struct
dnd_query_drag_params
params
;
HWND
hwnd
=
macdrv_get_window_hwnd
(
query
->
window
);
struct
macdrv_win_data
*
data
=
get_win_data
(
hwnd
);
void
*
ret_ptr
;
ULONG
ret_len
;
DWORD
effect
;
if
(
!
data
)
...
...
@@ -277,7 +288,9 @@ static BOOL query_drag_operation(macdrv_query *query)
params
.
handle
=
(
UINT_PTR
)
query
->
drag_operation
.
pasteboard
;
release_win_data
(
data
);
effect
=
macdrv_client_func
(
client_func_dnd_query_drag
,
&
params
,
sizeof
(
params
));
if
(
KeUserModeCallback
(
client_func_dnd_query_drag
,
&
params
,
sizeof
(
params
),
&
ret_ptr
,
&
ret_len
))
return
FALSE
;
effect
=
*
(
DWORD
*
)
ret_ptr
;
if
(
!
effect
)
return
FALSE
;
query
->
drag_operation
.
accepted_op
=
dropeffect_to_drag_operation
(
effect
,
...
...
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