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
95791ea0
Commit
95791ea0
authored
Aug 18, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move dialog proc setting implementation from win32u.
parent
577fbb0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
win.c
dlls/user32/win.c
+26
-0
window.c
dlls/win32u/window.c
+0
-11
No files found.
dlls/user32/win.c
View file @
95791ea0
...
...
@@ -637,6 +637,18 @@ static LONG_PTR get_window_long_ptr( HWND hwnd, int offset, LONG_PTR ret, BOOL a
}
static
LONG_PTR
set_dialog_proc
(
HWND
hwnd
,
LONG_PTR
newval
,
BOOL
ansi
)
{
DLGPROC
proc
;
LONG_PTR
ret
;
newval
=
NtUserCallTwoParam
(
newval
,
ansi
,
NtUserAllocWinProc
);
ret
=
NtUserSetWindowLong
(
hwnd
,
DWLP_DLGPROC
,
newval
,
ansi
);
proc
=
NtUserGetDialogProc
(
(
DLGPROC
)
ret
,
ansi
);
if
(
proc
)
ret
=
(
UINT_PTR
)
proc
;
return
ret
;
}
/***********************************************************************
* GetDpiForWindow (USER32.@)
*/
...
...
@@ -723,6 +735,10 @@ LONG WINAPI DECLSPEC_HOTPATCH SetWindowLongA( HWND hwnd, INT offset, LONG newval
WARN
(
"Invalid offset %d
\n
"
,
offset
);
SetLastError
(
ERROR_INVALID_INDEX
);
return
0
;
#else
case
DWLP_DLGPROC
:
if
(
NtUserGetDialogInfo
(
hwnd
))
return
set_dialog_proc
(
hwnd
,
newval
,
TRUE
);
/* fall through */
#endif
default:
return
NtUserSetWindowLong
(
hwnd
,
offset
,
newval
,
TRUE
);
...
...
@@ -811,6 +827,10 @@ LONG WINAPI DECLSPEC_HOTPATCH SetWindowLongW(
WARN
(
"Invalid offset %d
\n
"
,
offset
);
SetLastError
(
ERROR_INVALID_INDEX
);
return
0
;
#else
case
DWLP_DLGPROC
:
if
(
NtUserGetDialogInfo
(
hwnd
))
return
set_dialog_proc
(
hwnd
,
newval
,
FALSE
);
/* fall through */
#endif
default:
return
NtUserSetWindowLong
(
hwnd
,
offset
,
newval
,
FALSE
);
...
...
@@ -1450,6 +1470,9 @@ LONG_PTR WINAPI GetWindowLongPtrA( HWND hwnd, INT offset )
*/
LONG_PTR
WINAPI
SetWindowLongPtrW
(
HWND
hwnd
,
INT
offset
,
LONG_PTR
newval
)
{
if
(
offset
==
DWLP_DLGPROC
&&
NtUserGetDialogInfo
(
hwnd
))
return
set_dialog_proc
(
hwnd
,
newval
,
FALSE
);
return
NtUserSetWindowLongPtr
(
hwnd
,
offset
,
newval
,
FALSE
);
}
...
...
@@ -1458,6 +1481,9 @@ LONG_PTR WINAPI SetWindowLongPtrW( HWND hwnd, INT offset, LONG_PTR newval )
*/
LONG_PTR
WINAPI
SetWindowLongPtrA
(
HWND
hwnd
,
INT
offset
,
LONG_PTR
newval
)
{
if
(
offset
==
DWLP_DLGPROC
&&
NtUserGetDialogInfo
(
hwnd
))
return
set_dialog_proc
(
hwnd
,
newval
,
TRUE
);
return
NtUserSetWindowLongPtr
(
hwnd
,
offset
,
newval
,
TRUE
);
}
...
...
dlls/win32u/window.c
View file @
95791ea0
...
...
@@ -1309,17 +1309,6 @@ LONG_PTR set_window_long( HWND hwnd, INT offset, UINT size, LONG_PTR newval, BOO
case
GWLP_HINSTANCE
:
case
GWLP_USERDATA
:
break
;
case
DWLP_DLGPROC
:
if
((
win
->
cbWndExtra
-
sizeof
(
LONG_PTR
)
>=
DWLP_DLGPROC
)
&&
(
size
==
sizeof
(
LONG_PTR
))
&&
win
->
dlgInfo
)
{
WNDPROC
*
ptr
=
(
WNDPROC
*
)((
char
*
)
win
->
wExtra
+
DWLP_DLGPROC
);
retval
=
(
ULONG_PTR
)
get_winproc
(
*
ptr
,
ansi
);
*
ptr
=
alloc_winproc
(
(
WNDPROC
)
newval
,
ansi
);
release_win_ptr
(
win
);
return
retval
;
}
/* fall through */
default:
if
(
offset
<
0
||
offset
>
(
int
)(
win
->
cbWndExtra
-
size
))
{
...
...
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