emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 e325d26: Fix interrupt-process on MS-Windows


From: Eli Zaretskii
Subject: emacs-27 e325d26: Fix interrupt-process on MS-Windows
Date: Thu, 16 Jul 2020 12:52:51 -0400 (EDT)

branch: emacs-27
commit e325d2638c06dfe0589b5dee7d1cad8fb41f740f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix interrupt-process on MS-Windows
    
    * src/w32proc.c (sys_kill): Test the status of the left Ctrl key
    for the purpose of restoring it after simulating Ctrl-C.  This
    avoids leaving the left Ctrl key status in depressed state when
    the user actually pressed the right Ctrl key.  (Bug#42350)
---
 src/w32proc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/w32proc.c b/src/w32proc.c
index de33726..62d7377 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -2790,11 +2790,11 @@ sys_kill (pid_t pid, int sig)
               /* Set the foreground window to the child.  */
               if (SetForegroundWindow (cp->hwnd))
                 {
-                 /* Record the state of the Ctrl key: the user could
-                    have it depressed while we are simulating Ctrl-C,
-                    in which case we will have to leave the state of
-                    Ctrl depressed when we are done.  */
-                 short ctrl_state = GetKeyState (VK_CONTROL) & 0x8000;
+                 /* Record the state of the left Ctrl key: the user
+                    could have it depressed while we are simulating
+                    Ctrl-C, in which case we will have to leave the
+                    state of that Ctrl depressed when we are done.  */
+                 short ctrl_state = GetKeyState (VK_LCONTROL) & 0x8000;
 
                   /* Generate keystrokes as if user had typed Ctrl-Break or
                      Ctrl-C.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]