mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 07d0f1f0c0bbd744f5f107f82b702a891e41c2eb.
This commit is contained in:
parent
42e2a72d37
commit
d3d87f1a2c
@ -1,2 +1,3 @@
|
||||
Fixes: [48175] AION (64 bit) - crashes in crysystem.dll.CryFree() due to high memory pointers allocated
|
||||
Fixes: [46568] 64-bit msxml6.dll from Microsoft Core XML Services 6.0 redist package fails to load (Wine doesn't respect 44-bit user-mode VA limitation from Windows < 8.1)
|
||||
Disabled: True
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c477afc32310c399f4c6a40e9943a2af69811006 Mon Sep 17 00:00:00 2001
|
||||
From 8207b28257d14ec36812ce1a846a7ac62f453b0e Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 15 Mar 2015 01:05:48 +0100
|
||||
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
|
||||
@ -15,10 +15,10 @@ Changes in v3:
|
||||
2 files changed, 62 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
|
||||
index 139272a61fe..c390afd9e87 100644
|
||||
index 03ab672f910..0943ee8e99b 100644
|
||||
--- a/dlls/user32/tests/msg.c
|
||||
+++ b/dlls/user32/tests/msg.c
|
||||
@@ -12853,13 +12853,10 @@ static void test_PeekMessage3(void)
|
||||
@@ -13808,13 +13808,10 @@ static void test_PeekMessage3(void)
|
||||
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
|
||||
PostMessageA(hwnd, WM_USER, 0, 0);
|
||||
ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
|
||||
@ -32,7 +32,7 @@ index 139272a61fe..c390afd9e87 100644
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
@@ -12869,10 +12866,8 @@ static void test_PeekMessage3(void)
|
||||
@@ -13824,10 +13821,8 @@ static void test_PeekMessage3(void)
|
||||
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
|
||||
PostMessageA(hwnd, WM_USER, 0, 0);
|
||||
ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
|
||||
@ -43,7 +43,7 @@ index 139272a61fe..c390afd9e87 100644
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
@@ -12884,10 +12879,8 @@ static void test_PeekMessage3(void)
|
||||
@@ -13839,10 +13834,8 @@ static void test_PeekMessage3(void)
|
||||
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
|
||||
PostMessageA(hwnd, WM_USER, 0, 0);
|
||||
ret = GetMessageA(&msg, NULL, 0, 0);
|
||||
@ -54,7 +54,7 @@ index 139272a61fe..c390afd9e87 100644
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
@@ -12915,14 +12908,32 @@ static void test_PeekMessage3(void)
|
||||
@@ -13870,14 +13863,32 @@ static void test_PeekMessage3(void)
|
||||
ret = GetMessageA(&msg, NULL, 0, 0);
|
||||
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
|
||||
ret = GetMessageA(&msg, NULL, 0, 0);
|
||||
@ -90,10 +90,10 @@ index 139272a61fe..c390afd9e87 100644
|
||||
* because both messages are in the same queue. */
|
||||
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index d79add56fba..15c4b21ea50 100644
|
||||
index 1e2647aac27..b3390f17ba5 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -141,6 +141,7 @@ struct msg_queue
|
||||
@@ -142,6 +142,7 @@ struct msg_queue
|
||||
struct hook_table *hooks; /* hook table */
|
||||
timeout_t last_get_msg; /* time of last get message call */
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
@ -101,7 +101,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -309,6 +310,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -310,6 +311,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->hooks = NULL;
|
||||
queue->last_get_msg = current_time;
|
||||
queue->keystate_lock = 0;
|
||||
@ -109,7 +109,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -576,13 +578,21 @@ static inline struct msg_queue *get_current_queue(void)
|
||||
@@ -592,13 +594,21 @@ static inline struct msg_queue *get_current_queue(void)
|
||||
}
|
||||
|
||||
/* get a (pseudo-)unique id to tag hardware messages */
|
||||
@ -129,10 +129,10 @@ index d79add56fba..15c4b21ea50 100644
|
||||
+ return id;
|
||||
+}
|
||||
+
|
||||
/* try to merge a message with the last in the list; return 1 if successful */
|
||||
static int merge_message( struct thread_input *input, const struct message *msg )
|
||||
/* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */
|
||||
static int merge_mousemove( struct thread_input *input, const struct message *msg )
|
||||
{
|
||||
@@ -860,7 +870,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
|
||||
@@ -908,7 +918,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
|
||||
}
|
||||
|
||||
/* retrieve a posted message */
|
||||
@ -141,7 +141,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
unsigned int first, unsigned int last, unsigned int flags,
|
||||
struct get_message_reply *reply )
|
||||
{
|
||||
@@ -871,6 +881,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
|
||||
@@ -919,6 +929,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
|
||||
{
|
||||
if (!match_window( win, msg->win )) continue;
|
||||
if (!check_msg_filter( msg->msg, first, last )) continue;
|
||||
@ -149,7 +149,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
goto found; /* found one */
|
||||
}
|
||||
return 0;
|
||||
@@ -1487,6 +1498,7 @@ found:
|
||||
@@ -1536,6 +1547,7 @@ found:
|
||||
msg->msg = WM_HOTKEY;
|
||||
msg->wparam = hotkey->id;
|
||||
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
|
||||
@ -157,7 +157,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
|
||||
free( msg->data );
|
||||
msg->data = NULL;
|
||||
@@ -2198,7 +2210,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
@@ -2226,7 +2238,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
}
|
||||
|
||||
/* now we can return it */
|
||||
@ -166,7 +166,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
reply->type = MSG_HARDWARE;
|
||||
reply->win = win;
|
||||
reply->msg = msg_code;
|
||||
@@ -2304,6 +2316,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
|
||||
@@ -2364,6 +2376,7 @@ void send_notify_message( user_handle_t win, unsigned int message, lparam_t wpar
|
||||
msg->result = NULL;
|
||||
msg->data = NULL;
|
||||
msg->data_size = 0;
|
||||
@ -174,7 +174,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
|
||||
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
|
||||
|
||||
@@ -2548,6 +2561,7 @@ DECL_HANDLER(send_message)
|
||||
@@ -2576,6 +2589,7 @@ DECL_HANDLER(send_message)
|
||||
set_queue_bits( recv_queue, QS_SENDMESSAGE );
|
||||
break;
|
||||
case MSG_POSTED:
|
||||
@ -182,7 +182,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
|
||||
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
|
||||
if (msg->msg == WM_HOTKEY)
|
||||
@@ -2668,12 +2682,12 @@ DECL_HANDLER(get_message)
|
||||
@@ -2694,12 +2708,12 @@ DECL_HANDLER(get_message)
|
||||
|
||||
/* then check for posted messages */
|
||||
if ((filter & QS_POSTMESSAGE) &&
|
||||
@ -197,7 +197,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
return;
|
||||
|
||||
/* only check for quit messages if not posted messages pending */
|
||||
@@ -2684,7 +2698,7 @@ DECL_HANDLER(get_message)
|
||||
@@ -2710,7 +2724,7 @@ DECL_HANDLER(get_message)
|
||||
if ((filter & QS_INPUT) &&
|
||||
filter_contains_hw_range( req->get_first, req->get_last ) &&
|
||||
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
|
||||
@ -206,7 +206,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
|
||||
/* now check for WM_PAINT */
|
||||
if ((filter & QS_PAINT) &&
|
||||
@@ -2697,7 +2711,7 @@ DECL_HANDLER(get_message)
|
||||
@@ -2723,7 +2737,7 @@ DECL_HANDLER(get_message)
|
||||
reply->wparam = 0;
|
||||
reply->lparam = 0;
|
||||
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
|
||||
@ -215,7 +215,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
}
|
||||
|
||||
/* now check for timer */
|
||||
@@ -2713,13 +2727,30 @@ DECL_HANDLER(get_message)
|
||||
@@ -2739,13 +2753,30 @@ DECL_HANDLER(get_message)
|
||||
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
|
||||
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
|
||||
set_event( current->process->idle_event );
|
||||
@ -247,7 +247,7 @@ index d79add56fba..15c4b21ea50 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -2737,7 +2768,10 @@ DECL_HANDLER(reply_message)
|
||||
@@ -2763,7 +2794,10 @@ DECL_HANDLER(reply_message)
|
||||
DECL_HANDLER(accept_hardware_message)
|
||||
{
|
||||
if (current->queue)
|
||||
@ -259,5 +259,5 @@ index d79add56fba..15c4b21ea50 100644
|
||||
set_error( STATUS_ACCESS_DENIED );
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1 +1 @@
|
||||
6b0836e3f157318b00effc1de563da4d4b0d16b8
|
||||
07d0f1f0c0bbd744f5f107f82b702a891e41c2eb
|
||||
|
Loading…
Reference in New Issue
Block a user