]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Reset compose state to zero when PuTTY window gains focus
authorSimon Tatham <anakin@pobox.com>
Mon, 30 Oct 2000 10:16:32 +0000 (10:16 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 30 Oct 2000 10:16:32 +0000 (10:16 +0000)
[originally from svn r779]

window.c

index c1ae7e4f985b9449f64d6bac9904ca2e12d7889d..315df81b973a53548a9330f5e1567d99fb4d36de 100644 (file)
--- a/window.c
+++ b/window.c
@@ -102,6 +102,8 @@ static char *window_name, *icon_name;
 
 static Ldisc *real_ldisc;
 
+static int compose_state = 0;
+
 void begin_session(void) {
     ldisc = real_ldisc;
 }
@@ -1363,6 +1365,7 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
        has_focus = TRUE;
         CreateCaret(hwnd, caretbm, 0, 0);
         ShowCaret(hwnd);
+        compose_state = 0;
        term_out();
        term_update();
        break;
@@ -1828,7 +1831,6 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
     unsigned char * p = output;
 
     static WORD keys[3];
-    static int compose_state = 0;
     static int compose_char = 0;
     static WPARAM compose_key = 0;