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
e0d62e85
Commit
e0d62e85
authored
Jul 10, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Always use NtCallbackReturn in User32DrawText.
parent
0aa36a83
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
22 deletions
+6
-22
user_main.c
dlls/user32/user_main.c
+3
-9
font.c
dlls/win32u/font.c
+0
-1
user.c
dlls/wow64win/user.c
+3
-11
ntuser.h
include/ntuser.h
+0
-1
No files found.
dlls/user32/user_main.c
View file @
e0d62e85
...
@@ -121,19 +121,13 @@ static NTSTATUS WINAPI User32DrawScrollBar( const struct draw_scroll_bar_params
...
@@ -121,19 +121,13 @@ static NTSTATUS WINAPI User32DrawScrollBar( const struct draw_scroll_bar_params
return
0
;
return
0
;
}
}
static
NTSTATUS
WINAPI
User32DrawText
(
const
struct
draw_text_params
*
params
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32DrawText
(
struct
draw_text_params
*
params
,
ULONG
size
)
{
{
RECT
rect
=
params
->
rect
;
int
ret
;
int
ret
;
size
-=
FIELD_OFFSET
(
struct
draw_text_params
,
str
);
size
-=
FIELD_OFFSET
(
struct
draw_text_params
,
str
);
ret
=
DrawTextW
(
params
->
hdc
,
params
->
str
,
size
/
sizeof
(
WCHAR
),
&
rect
,
params
->
flags
);
ret
=
DrawTextW
(
params
->
hdc
,
params
->
str
,
size
/
sizeof
(
WCHAR
),
&
params
->
rect
,
params
->
flags
);
if
(
params
->
ret_rect
)
return
NtCallbackReturn
(
&
params
->
rect
,
sizeof
(
params
->
rect
),
ret
);
{
*
params
->
ret_rect
=
rect
;
return
ret
;
}
return
NtCallbackReturn
(
&
rect
,
sizeof
(
rect
),
ret
);
}
}
static
NTSTATUS
WINAPI
User32ImmProcessKey
(
const
struct
imm_process_key_params
*
params
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32ImmProcessKey
(
const
struct
imm_process_key_params
*
params
,
ULONG
size
)
...
...
dlls/win32u/font.c
View file @
e0d62e85
...
@@ -7097,7 +7097,6 @@ INT WINAPI DECLSPEC_HIDDEN DrawTextW( HDC hdc, const WCHAR *str, INT count, RECT
...
@@ -7097,7 +7097,6 @@ INT WINAPI DECLSPEC_HIDDEN DrawTextW( HDC hdc, const WCHAR *str, INT count, RECT
if
(
!
(
params
=
malloc
(
size
)))
return
0
;
if
(
!
(
params
=
malloc
(
size
)))
return
0
;
params
->
hdc
=
hdc
;
params
->
hdc
=
hdc
;
params
->
rect
=
*
rect
;
params
->
rect
=
*
rect
;
params
->
ret_rect
=
rect
;
params
->
flags
=
flags
;
params
->
flags
=
flags
;
if
(
count
)
memcpy
(
params
->
str
,
str
,
count
*
sizeof
(
WCHAR
)
);
if
(
count
)
memcpy
(
params
->
str
,
str
,
count
*
sizeof
(
WCHAR
)
);
ret
=
KeUserModeCallback
(
NtUserDrawText
,
params
,
size
,
&
ret_ptr
,
&
ret_len
);
ret
=
KeUserModeCallback
(
NtUserDrawText
,
params
,
size
,
&
ret_ptr
,
&
ret_len
);
...
...
dlls/wow64win/user.c
View file @
e0d62e85
...
@@ -312,7 +312,6 @@ struct draw_text_params32
...
@@ -312,7 +312,6 @@ struct draw_text_params32
ULONG
hdc
;
ULONG
hdc
;
int
count
;
int
count
;
RECT
rect
;
RECT
rect
;
ULONG
ret_rect
;
UINT
flags
;
UINT
flags
;
WCHAR
str
[
1
];
WCHAR
str
[
1
];
};
};
...
@@ -832,25 +831,18 @@ static NTSTATUS WINAPI wow64_NtUserDrawText( void *arg, ULONG size )
...
@@ -832,25 +831,18 @@ static NTSTATUS WINAPI wow64_NtUserDrawText( void *arg, ULONG size )
{
{
struct
draw_text_params
*
params
=
arg
;
struct
draw_text_params
*
params
=
arg
;
struct
draw_text_params32
*
params32
;
struct
draw_text_params32
*
params32
;
RECT
*
rect_ptr
=
params
->
ret_rect
;
ULONG
offset
=
offsetof
(
struct
draw_text_params
,
str
)
-
offsetof
(
struct
draw_text_params32
,
str
)
;
ULONG
ret_len
;
ULONG
ret_len
;
void
*
ret_ptr
;
void
*
ret_ptr
;
NTSTATUS
ret
;
NTSTATUS
ret
;
params32
=
(
struct
draw_text_params32
*
)(
params
+
1
)
-
1
;
params32
=
(
struct
draw_text_params32
*
)(
(
char
*
)
params
+
offset
)
;
params32
->
flags
=
params
->
flags
;
params32
->
flags
=
params
->
flags
;
params32
->
ret_rect
=
0
;
params32
->
rect
=
params
->
rect
;
params32
->
rect
=
params
->
rect
;
params32
->
count
=
params
->
count
;
params32
->
count
=
params
->
count
;
params32
->
hdc
=
HandleToUlong
(
params
->
hdc
);
params32
->
hdc
=
HandleToUlong
(
params
->
hdc
);
ret
=
Wow64KiUserCallbackDispatcher
(
NtUserDrawText
,
params32
,
ret
=
Wow64KiUserCallbackDispatcher
(
NtUserDrawText
,
params32
,
size
-
offset
,
&
ret_ptr
,
&
ret_len
);
size
-
sizeof
(
*
params
)
+
sizeof
(
*
params32
),
&
ret_ptr
,
&
ret_len
);
if
(
ret_len
==
sizeof
(
RECT
)
&&
rect_ptr
)
{
*
rect_ptr
=
*
(
const
RECT
*
)
ret_ptr
;
return
ret
;
}
return
NtCallbackReturn
(
ret_ptr
,
ret_len
,
ret
);
return
NtCallbackReturn
(
ret_ptr
,
ret_len
,
ret
);
}
}
...
...
include/ntuser.h
View file @
e0d62e85
...
@@ -188,7 +188,6 @@ struct draw_text_params
...
@@ -188,7 +188,6 @@ struct draw_text_params
HDC
hdc
;
HDC
hdc
;
int
count
;
int
count
;
RECT
rect
;
RECT
rect
;
RECT
*
ret_rect
;
/* FIXME: Use NtCallbackReturn instead */
UINT
flags
;
UINT
flags
;
WCHAR
str
[
1
];
WCHAR
str
[
1
];
};
};
...
...
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