From 47754ac770645adbe662e5f457d272aebf84b656 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sat, 17 Feb 2018 12:40:17 -0600 Subject: [PATCH] Remove user32-Invalidate_Key_State fixed by https://source.winehq.org/git/wine.git/commitdiff/059d5ece23265e003ab413aa711e963da9c0564e --- patches/patchinstall.sh | 19 ------- ...invalidate-key-state-on-changes-in-o.patch | 50 ------------------- .../user32-Invalidate_Key_State/definition | 1 - 3 files changed, 70 deletions(-) delete mode 100644 patches/user32-Invalidate_Key_State/0001-user32-Globally-invalidate-key-state-on-changes-in-o.patch delete mode 100644 patches/user32-Invalidate_Key_State/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 46d5aff0..3cff79d8 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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: diff --git a/patches/user32-Invalidate_Key_State/0001-user32-Globally-invalidate-key-state-on-changes-in-o.patch b/patches/user32-Invalidate_Key_State/0001-user32-Globally-invalidate-key-state-on-changes-in-o.patch deleted file mode 100644 index 21682f7f..00000000 --- a/patches/user32-Invalidate_Key_State/0001-user32-Globally-invalidate-key-state-on-changes-in-o.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 6ef2ab6c2318d4fb15220891ce16768e84354a88 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -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 - diff --git a/patches/user32-Invalidate_Key_State/definition b/patches/user32-Invalidate_Key_State/definition deleted file mode 100644 index 975f6b0e..00000000 --- a/patches/user32-Invalidate_Key_State/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [29871] Globally invalidate key state on changes in other threads