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
b053e924
Commit
b053e924
authored
Mar 15, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Process internal messages when checking queue status.
parent
a8451741
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
12 deletions
+47
-12
device8.c
dlls/dinput/tests/device8.c
+11
-0
input.c
dlls/win32u/input.c
+9
-0
message.c
dlls/win32u/message.c
+3
-10
ntuser_private.h
dlls/win32u/ntuser_private.h
+11
-0
server_protocol.h
include/wine/server_protocol.h
+3
-1
protocol.def
server/protocol.def
+1
-0
queue.c
server/queue.c
+6
-0
request.h
server/request.h
+2
-1
trace.c
server/trace.c
+1
-0
No files found.
dlls/dinput/tests/device8.c
View file @
b053e924
...
@@ -2038,6 +2038,9 @@ static void test_hid_touch_screen(void)
...
@@ -2038,6 +2038,9 @@ static void test_hid_touch_screen(void)
ret
=
RegisterRawInputDevices
(
&
rawdevice
,
1
,
sizeof
(
RAWINPUTDEVICE
)
);
ret
=
RegisterRawInputDevices
(
&
rawdevice
,
1
,
sizeof
(
RAWINPUTDEVICE
)
);
ok
(
ret
,
"RegisterRawInputDevices failed, error %lu
\n
"
,
GetLastError
()
);
ok
(
ret
,
"RegisterRawInputDevices failed, error %lu
\n
"
,
GetLastError
()
);
res
=
GetQueueStatus
(
QS_RAWINPUT
);
ok
(
res
==
0
,
"got res %#lx
\n
"
,
res
);
bus_send_hid_input
(
file
,
&
desc
,
&
touch_multiple
,
sizeof
(
touch_multiple
)
);
bus_send_hid_input
(
file
,
&
desc
,
&
touch_multiple
,
sizeof
(
touch_multiple
)
);
bus_wait_hid_input
(
file
,
&
desc
,
5000
);
bus_wait_hid_input
(
file
,
&
desc
,
5000
);
bus_send_hid_input
(
file
,
&
desc
,
&
touch_release
,
sizeof
(
touch_release
)
);
bus_send_hid_input
(
file
,
&
desc
,
&
touch_release
,
sizeof
(
touch_release
)
);
...
@@ -2046,6 +2049,10 @@ static void test_hid_touch_screen(void)
...
@@ -2046,6 +2049,10 @@ static void test_hid_touch_screen(void)
res
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
500
,
QS_POINTER
);
res
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
500
,
QS_POINTER
);
ok
(
!
res
,
"MsgWaitForMultipleObjects returned %#lx
\n
"
,
res
);
ok
(
!
res
,
"MsgWaitForMultipleObjects returned %#lx
\n
"
,
res
);
res
=
GetQueueStatus
(
QS_RAWINPUT
);
ok
(
LOWORD
(
res
)
==
QS_RAWINPUT
,
"got res %#lx
\n
"
,
res
);
ok
(
HIWORD
(
res
)
==
QS_RAWINPUT
,
"got res %#lx
\n
"
,
res
);
memset
(
rawbuffer
,
0
,
sizeof
(
rawbuffer
)
);
memset
(
rawbuffer
,
0
,
sizeof
(
rawbuffer
)
);
rawinput
=
(
RAWINPUT
*
)
rawbuffer
;
rawinput
=
(
RAWINPUT
*
)
rawbuffer
;
rawbuffer_size
=
sizeof
(
rawbuffer
);
rawbuffer_size
=
sizeof
(
rawbuffer
);
...
@@ -2064,6 +2071,10 @@ static void test_hid_touch_screen(void)
...
@@ -2064,6 +2071,10 @@ static void test_hid_touch_screen(void)
ok
(
!
memcmp
(
rawinput
->
data
.
hid
.
bRawData
,
touch_multiple
.
report_buf
,
desc
.
caps
.
InputReportByteLength
),
ok
(
!
memcmp
(
rawinput
->
data
.
hid
.
bRawData
,
touch_multiple
.
report_buf
,
desc
.
caps
.
InputReportByteLength
),
"got unexpected report data
\n
"
);
"got unexpected report data
\n
"
);
res
=
GetQueueStatus
(
QS_RAWINPUT
);
ok
(
LOWORD
(
res
)
==
0
,
"got res %#lx
\n
"
,
res
);
ok
(
HIWORD
(
res
)
==
0
,
"got res %#lx
\n
"
,
res
);
rawdevice
.
dwFlags
=
RIDEV_REMOVE
;
rawdevice
.
dwFlags
=
RIDEV_REMOVE
;
rawdevice
.
hwndTarget
=
0
;
rawdevice
.
hwndTarget
=
0
;
ret
=
RegisterRawInputDevices
(
&
rawdevice
,
1
,
sizeof
(
RAWINPUTDEVICE
)
);
ret
=
RegisterRawInputDevices
(
&
rawdevice
,
1
,
sizeof
(
RAWINPUTDEVICE
)
);
...
...
dlls/win32u/input.c
View file @
b053e924
...
@@ -791,8 +791,17 @@ BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
...
@@ -791,8 +791,17 @@ BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
static
void
check_for_events
(
UINT
flags
)
static
void
check_for_events
(
UINT
flags
)
{
{
struct
peek_message_filter
filter
=
{
.
internal
=
TRUE
,
.
flags
=
PM_REMOVE
,
};
MSG
msg
;
if
(
!
user_driver
->
pProcessEvents
(
flags
))
if
(
!
user_driver
->
pProcessEvents
(
flags
))
flush_window_surfaces
(
TRUE
);
flush_window_surfaces
(
TRUE
);
peek_message
(
&
msg
,
&
filter
);
}
}
/**********************************************************************
/**********************************************************************
...
...
dlls/win32u/message.c
View file @
b053e924
...
@@ -2695,15 +2695,6 @@ static BOOL process_hardware_message( MSG *msg, UINT hw_id, const struct hardwar
...
@@ -2695,15 +2695,6 @@ static BOOL process_hardware_message( MSG *msg, UINT hw_id, const struct hardwar
return
ret
;
return
ret
;
}
}
struct
peek_message_filter
{
HWND
hwnd
;
UINT
first
;
UINT
last
;
UINT
mask
;
UINT
flags
;
};
/***********************************************************************
/***********************************************************************
* peek_message
* peek_message
*
*
...
@@ -2711,7 +2702,7 @@ struct peek_message_filter
...
@@ -2711,7 +2702,7 @@ struct peek_message_filter
* available; -1 on error.
* available; -1 on error.
* All pending sent messages are processed before returning.
* All pending sent messages are processed before returning.
*/
*/
static
int
peek_message
(
MSG
*
msg
,
const
struct
peek_message_filter
*
filter
)
int
peek_message
(
MSG
*
msg
,
const
struct
peek_message_filter
*
filter
)
{
{
LRESULT
result
;
LRESULT
result
;
HWND
hwnd
=
filter
->
hwnd
;
HWND
hwnd
=
filter
->
hwnd
;
...
@@ -2738,6 +2729,7 @@ static int peek_message( MSG *msg, const struct peek_message_filter *filter )
...
@@ -2738,6 +2729,7 @@ static int peek_message( MSG *msg, const struct peek_message_filter *filter )
SERVER_START_REQ
(
get_message
)
SERVER_START_REQ
(
get_message
)
{
{
req
->
internal
=
filter
->
internal
;
req
->
flags
=
flags
;
req
->
flags
=
flags
;
req
->
get_win
=
wine_server_user_handle
(
hwnd
);
req
->
get_win
=
wine_server_user_handle
(
hwnd
);
req
->
get_first
=
first
;
req
->
get_first
=
first
;
...
@@ -2923,6 +2915,7 @@ static int peek_message( MSG *msg, const struct peek_message_filter *filter )
...
@@ -2923,6 +2915,7 @@ static int peek_message( MSG *msg, const struct peek_message_filter *filter )
.
first
=
info
.
msg
.
message
,
.
first
=
info
.
msg
.
message
,
.
last
=
info
.
msg
.
message
,
.
last
=
info
.
msg
.
message
,
.
mask
=
filter
->
mask
,
.
mask
=
filter
->
mask
,
.
internal
=
filter
->
internal
,
};
};
peek_message
(
msg
,
&
new_filter
);
peek_message
(
msg
,
&
new_filter
);
}
}
...
...
dlls/win32u/ntuser_private.h
View file @
b053e924
...
@@ -238,6 +238,17 @@ extern void free_dce( struct dce *dce, HWND hwnd );
...
@@ -238,6 +238,17 @@ extern void free_dce( struct dce *dce, HWND hwnd );
extern
void
invalidate_dce
(
WND
*
win
,
const
RECT
*
extra_rect
);
extern
void
invalidate_dce
(
WND
*
win
,
const
RECT
*
extra_rect
);
/* message.c */
/* message.c */
struct
peek_message_filter
{
HWND
hwnd
;
UINT
first
;
UINT
last
;
UINT
mask
;
UINT
flags
;
BOOL
internal
;
};
extern
int
peek_message
(
MSG
*
msg
,
const
struct
peek_message_filter
*
filter
);
extern
BOOL
set_keyboard_auto_repeat
(
BOOL
enable
);
extern
BOOL
set_keyboard_auto_repeat
(
BOOL
enable
);
/* systray.c */
/* systray.c */
...
...
include/wine/server_protocol.h
View file @
b053e924
...
@@ -2877,6 +2877,8 @@ struct get_message_request
...
@@ -2877,6 +2877,8 @@ struct get_message_request
unsigned
int
hw_id
;
unsigned
int
hw_id
;
unsigned
int
wake_mask
;
unsigned
int
wake_mask
;
unsigned
int
changed_mask
;
unsigned
int
changed_mask
;
unsigned
int
internal
;
char
__pad_44
[
4
];
};
};
struct
get_message_reply
struct
get_message_reply
{
{
...
@@ -6507,7 +6509,7 @@ union generic_reply
...
@@ -6507,7 +6509,7 @@ union generic_reply
/* ### protocol_version begin ### */
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 79
7
#define SERVER_PROTOCOL_VERSION 79
8
/* ### protocol_version end ### */
/* ### protocol_version end ### */
...
...
server/protocol.def
View file @
b053e924
...
@@ -2150,6 +2150,7 @@ enum message_type
...
@@ -2150,6 +2150,7 @@ enum message_type
unsigned int hw_id; /* id of the previous hardware message (or 0) */
unsigned int hw_id; /* id of the previous hardware message (or 0) */
unsigned int wake_mask; /* wakeup bits mask */
unsigned int wake_mask; /* wakeup bits mask */
unsigned int changed_mask; /* changed bits mask */
unsigned int changed_mask; /* changed bits mask */
unsigned int internal; /* get internal messages only */
@REPLY
@REPLY
user_handle_t win; /* window handle */
user_handle_t win; /* window handle */
unsigned int msg; /* message code */
unsigned int msg; /* message code */
...
...
server/queue.c
View file @
b053e924
...
@@ -2994,6 +2994,12 @@ DECL_HANDLER(get_message)
...
@@ -2994,6 +2994,12 @@ DECL_HANDLER(get_message)
WM_WINE_LAST_DRIVER_MSG
,
req
->
flags
,
reply
))
WM_WINE_LAST_DRIVER_MSG
,
req
->
flags
,
reply
))
return
;
return
;
if
(
req
->
internal
)
/* check for internal messages only, leave queue flags unchanged */
{
set_error
(
STATUS_PENDING
);
return
;
}
queue
->
last_get_msg
=
current_time
;
queue
->
last_get_msg
=
current_time
;
if
(
!
filter
)
filter
=
QS_ALLINPUT
;
if
(
!
filter
)
filter
=
QS_ALLINPUT
;
...
...
server/request.h
View file @
b053e924
...
@@ -1412,7 +1412,8 @@ C_ASSERT( FIELD_OFFSET(struct get_message_request, get_last) == 24 );
...
@@ -1412,7 +1412,8 @@ C_ASSERT( FIELD_OFFSET(struct get_message_request, get_last) == 24 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
hw_id
)
==
28
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
hw_id
)
==
28
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
wake_mask
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
wake_mask
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
changed_mask
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
changed_mask
)
==
36
);
C_ASSERT
(
sizeof
(
struct
get_message_request
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_request
,
internal
)
==
40
);
C_ASSERT
(
sizeof
(
struct
get_message_request
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply
,
win
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply
,
win
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply
,
msg
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply
,
msg
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply
,
wparam
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_message_reply
,
wparam
)
==
16
);
...
...
server/trace.c
View file @
b053e924
...
@@ -2735,6 +2735,7 @@ static void dump_get_message_request( const struct get_message_request *req )
...
@@ -2735,6 +2735,7 @@ static void dump_get_message_request( const struct get_message_request *req )
fprintf
(
stderr
,
", hw_id=%08x"
,
req
->
hw_id
);
fprintf
(
stderr
,
", hw_id=%08x"
,
req
->
hw_id
);
fprintf
(
stderr
,
", wake_mask=%08x"
,
req
->
wake_mask
);
fprintf
(
stderr
,
", wake_mask=%08x"
,
req
->
wake_mask
);
fprintf
(
stderr
,
", changed_mask=%08x"
,
req
->
changed_mask
);
fprintf
(
stderr
,
", changed_mask=%08x"
,
req
->
changed_mask
);
fprintf
(
stderr
,
", internal=%08x"
,
req
->
internal
);
}
}
static
void
dump_get_message_reply
(
const
struct
get_message_reply
*
req
)
static
void
dump_get_message_reply
(
const
struct
get_message_reply
*
req
)
...
...
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