mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
parent
dce52cb85c
commit
47754ac770
@ -390,7 +390,6 @@ patch_enable_all ()
|
||||
enable_user32_GetAutoRotationState="$1"
|
||||
enable_user32_GetSystemMetrics="$1"
|
||||
enable_user32_Groupbox_Rectangle="$1"
|
||||
enable_user32_Invalidate_Key_State="$1"
|
||||
enable_user32_LR_LOADFROMFILE="$1"
|
||||
enable_user32_ListBox_Size="$1"
|
||||
enable_user32_MessageBox_WS_EX_TOPMOST="$1"
|
||||
@ -1435,9 +1434,6 @@ patch_enable ()
|
||||
user32-Groupbox_Rectangle)
|
||||
enable_user32_Groupbox_Rectangle="$2"
|
||||
;;
|
||||
user32-Invalidate_Key_State)
|
||||
enable_user32_Invalidate_Key_State="$2"
|
||||
;;
|
||||
user32-LR_LOADFROMFILE)
|
||||
enable_user32_LR_LOADFROMFILE="$2"
|
||||
;;
|
||||
@ -8481,21 +8477,6 @@ if test "$enable_user32_Groupbox_Rectangle" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-Invalidate_Key_State
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#29871] Globally invalidate key state on changes in other threads
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/user32/input.c
|
||||
# |
|
||||
if test "$enable_user32_Invalidate_Key_State" -eq 1; then
|
||||
patch_apply user32-Invalidate_Key_State/0001-user32-Globally-invalidate-key-state-on-changes-in-o.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "user32: Globally invalidate key state on changes in other threads.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-LR_LOADFROMFILE
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 6ef2ab6c2318d4fb15220891ce16768e84354a88 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 16 Jun 2015 02:56:25 +0200
|
||||
Subject: user32: Globally invalidate key state on changes in other threads.
|
||||
|
||||
---
|
||||
dlls/user32/input.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 40e35a9..95f3c2f 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -371,6 +371,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
|
||||
{
|
||||
struct user_key_state_info *key_state_info = get_user_thread_info()->key_state;
|
||||
INT counter = global_key_state_counter;
|
||||
+ BYTE prev_key_state;
|
||||
SHORT ret;
|
||||
|
||||
if (key < 0 || key >= 256) return 0;
|
||||
@@ -398,14 +399,23 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
|
||||
{
|
||||
req->tid = 0;
|
||||
req->key = key;
|
||||
- if (key_state_info) wine_server_set_reply( req, key_state_info->state,
|
||||
- sizeof(key_state_info->state) );
|
||||
+ if (key_state_info)
|
||||
+ {
|
||||
+ prev_key_state = key_state_info->state[key];
|
||||
+ wine_server_set_reply( req, key_state_info->state, sizeof(key_state_info->state) );
|
||||
+ }
|
||||
if (!wine_server_call( req ))
|
||||
{
|
||||
if (reply->state & 0x40) ret |= 0x0001;
|
||||
if (reply->state & 0x80) ret |= 0x8000;
|
||||
if (key_state_info)
|
||||
{
|
||||
+ /* force refreshing the key state cache - some multithreaded programs
|
||||
+ * (like Adobe Photoshop CS5) expect that changes to the async key state
|
||||
+ * are also immediately available in other threads. */
|
||||
+ if (prev_key_state != key_state_info->state[key])
|
||||
+ counter = interlocked_xchg_add( &global_key_state_counter, 1 ) + 1;
|
||||
+
|
||||
key_state_info->time = GetTickCount();
|
||||
key_state_info->counter = counter;
|
||||
}
|
||||
--
|
||||
2.4.3
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [29871] Globally invalidate key state on changes in other threads
|
Loading…
Reference in New Issue
Block a user