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
894d728b
Commit
894d728b
authored
Aug 14, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use a separate helper to send messages from win32u.
parent
439cdf49
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
12 deletions
+20
-12
clipboard.c
dlls/win32u/clipboard.c
+2
-2
input.c
dlls/win32u/input.c
+1
-1
message.c
dlls/win32u/message.c
+13
-5
palette.c
dlls/win32u/palette.c
+1
-1
sysparams.c
dlls/win32u/sysparams.c
+2
-2
win32u_private.h
dlls/win32u/win32u_private.h
+1
-1
No files found.
dlls/win32u/clipboard.c
View file @
894d728b
...
...
@@ -232,8 +232,8 @@ BOOL WINAPI NtUserEmptyClipboard(void)
TRACE
(
"owner %p
\n
"
,
owner
);
if
(
owner
)
send_message_timeout
(
owner
,
WM_DESTROYCLIPBOARD
,
0
,
0
,
SMTO_ABORTIFHUNG
,
5000
,
NULL
,
FALSE
);
if
(
owner
)
send_message_timeout
(
owner
,
WM_DESTROYCLIPBOARD
,
0
,
0
,
SMTO_ABORTIFHUNG
,
5000
,
FALSE
);
pthread_mutex_lock
(
&
clipboard_mutex
);
...
...
dlls/win32u/input.c
View file @
894d728b
...
...
@@ -1636,7 +1636,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
/* send palette messages */
if
(
send_message
(
hwnd
,
WM_QUERYNEWPALETTE
,
0
,
0
))
send_message_timeout
(
HWND_BROADCAST
,
WM_PALETTEISCHANGING
,
(
WPARAM
)
hwnd
,
0
,
SMTO_ABORTIFHUNG
,
2000
,
NULL
,
FALSE
);
SMTO_ABORTIFHUNG
,
2000
,
FALSE
);
if
(
!
is_window
(
hwnd
))
return
FALSE
;
}
...
...
dlls/win32u/message.c
View file @
894d728b
...
...
@@ -2609,11 +2609,11 @@ static BOOL broadcast_message( struct send_message_info *info, DWORD_PTR *res_pt
{
case
MSG_UNICODE
:
send_message_timeout
(
list
[
i
],
info
->
msg
,
info
->
wparam
,
info
->
lparam
,
info
->
flags
,
info
->
timeout
,
NULL
,
FALSE
);
info
->
flags
,
info
->
timeout
,
FALSE
);
break
;
case
MSG_ASCII
:
send_message_timeout
(
list
[
i
],
info
->
msg
,
info
->
wparam
,
info
->
lparam
,
info
->
flags
,
info
->
timeout
,
NULL
,
TRUE
);
info
->
flags
,
info
->
timeout
,
TRUE
);
break
;
case
MSG_NOTIFY
:
NtUserMessageCall
(
list
[
i
],
info
->
msg
,
info
->
wparam
,
info
->
lparam
,
...
...
@@ -2810,7 +2810,7 @@ static LRESULT send_window_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
}
/* see SendMessageTimeoutW */
LRESULT
send_message_timeout
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
static
LRESULT
send_client_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
UINT
flags
,
UINT
timeout
,
DWORD_PTR
*
res_ptr
,
BOOL
ansi
)
{
struct
send_message_info
info
;
...
...
@@ -2828,10 +2828,18 @@ LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
return
process_message
(
&
info
,
res_ptr
,
ansi
);
}
LRESULT
send_message_timeout
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
UINT
flags
,
UINT
timeout
,
BOOL
ansi
)
{
DWORD_PTR
res
=
0
;
send_client_message
(
hwnd
,
msg
,
wparam
,
lparam
,
flags
,
timeout
,
&
res
,
ansi
);
return
res
;
}
/* see SendMessageW */
LRESULT
send_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
return
send_
window_message
(
hwnd
,
msg
,
wparam
,
lparam
,
NULL
,
FALSE
);
return
send_
message_timeout
(
hwnd
,
msg
,
wparam
,
lparam
,
SMTO_NORMAL
,
0
,
FALSE
);
}
/* see SendNotifyMessageW */
...
...
@@ -2971,7 +2979,7 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
{
struct
send_message_timeout_params
*
params
=
(
void
*
)
result_info
;
DWORD_PTR
res
=
0
;
params
->
result
=
send_
message_timeout
(
hwnd
,
msg
,
wparam
,
lparam
,
params
->
flags
,
params
->
result
=
send_
client_message
(
hwnd
,
msg
,
wparam
,
lparam
,
params
->
flags
,
params
->
timeout
,
&
res
,
ansi
);
return
res
;
}
...
...
dlls/win32u/palette.c
View file @
894d728b
...
...
@@ -584,7 +584,7 @@ UINT realize_palette( HDC hdc )
/* send palette change notification */
HWND
hwnd
=
NtUserWindowFromDC
(
hdc
);
if
(
hwnd
)
send_message_timeout
(
HWND_BROADCAST
,
WM_PALETTECHANGED
,
HandleToUlong
(
hwnd
),
0
,
SMTO_ABORTIFHUNG
,
2000
,
NULL
,
FALSE
);
SMTO_ABORTIFHUNG
,
2000
,
FALSE
);
}
return
realized
;
}
...
...
dlls/win32u/sysparams.c
View file @
894d728b
...
...
@@ -4397,7 +4397,7 @@ BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT w
static
const
WCHAR
emptyW
[
1
];
if
(
winini
&
(
SPIF_SENDWININICHANGE
|
SPIF_SENDCHANGE
))
send_message_timeout
(
HWND_BROADCAST
,
WM_SETTINGCHANGE
,
action
,
(
LPARAM
)
emptyW
,
SMTO_ABORTIFHUNG
,
2000
,
NULL
,
FALSE
);
SMTO_ABORTIFHUNG
,
2000
,
FALSE
);
}
TRACE
(
"(%u, %u, %p, %u) ret %d
\n
"
,
action
,
val
,
ptr
,
winini
,
ret
);
return
ret
;
...
...
@@ -4840,7 +4840,7 @@ BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *va
/* Send WM_SYSCOLORCHANGE message to all windows */
send_message_timeout
(
HWND_BROADCAST
,
WM_SYSCOLORCHANGE
,
0
,
0
,
SMTO_ABORTIFHUNG
,
2000
,
NULL
,
FALSE
);
SMTO_ABORTIFHUNG
,
2000
,
FALSE
);
/* Repaint affected portions of all visible windows */
NtUserRedrawWindow
(
0
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
|
RDW_UPDATENOW
|
RDW_ALLCHILDREN
);
return
TRUE
;
...
...
dlls/win32u/win32u_private.h
View file @
894d728b
...
...
@@ -308,7 +308,7 @@ extern LRESULT send_internal_message_timeout( DWORD dest_pid, DWORD dest_tid, UI
PDWORD_PTR
res_ptr
)
DECLSPEC_HIDDEN
;
extern
LRESULT
send_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
send_message_timeout
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
UINT
flags
,
UINT
timeout
,
PDWORD_PTR
res_ptr
,
BOOL
ansi
);
UINT
flags
,
UINT
timeout
,
BOOL
ansi
);
/* rawinput.c */
extern
BOOL
process_rawinput_message
(
MSG
*
msg
,
UINT
hw_id
,
const
struct
hardware_msg_data
*
msg_data
)
DECLSPEC_HIDDEN
;
...
...
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