Commit 75b7f395 for guacamole.apache.org

commit 75b7f39525e6dba261b4d1f7cf5cc98f96581745
Author: Ciro Iriarte <ciro.iriarte@gmail.com>
Date:   Sun Nov 1 12:16:31 2026 -0300

    GUACAMOLE-2348: Release modifiers pressed for a dead key before the base key.

    When a keysym is typed as a dead key plus a base key, modifiers pressed only
    for the dead key (such as AltGr) stayed held for the base key. Windows does
    not complete a dead key with AltGr+Space, so "`" and "^" on layouts with AltGr
    dead keys left the accent pending for the next letter.

diff --git a/src/protocols/rdp/decompose.c b/src/protocols/rdp/decompose.c
index d5c91e02..6a03fd4e 100644
--- a/src/protocols/rdp/decompose.c
+++ b/src/protocols/rdp/decompose.c
@@ -161,10 +161,19 @@ int guac_rdp_decompose_keysym(guac_rdp_keyboard* keyboard, int keysym) {
             || !guac_rdp_keyboard_is_defined(keyboard, key->base_keysym))
         return 1;

+    /* Note the modifiers held before the dead key is typed */
+    unsigned int modifier_flags = guac_rdp_keyboard_get_modifier_flags(keyboard);
+
     /* Press dead key */
     guac_rdp_keyboard_update_keysym(keyboard, key->dead_keysym, 1, GUAC_RDP_KEY_SOURCE_SYNTHETIC);
     guac_rdp_keyboard_update_keysym(keyboard, key->dead_keysym, 0, GUAC_RDP_KEY_SOURCE_SYNTHETIC);

+    /* Release any modifiers pressed only to type the dead key (such as AltGr),
+     * as the remote side would otherwise receive the base key with those
+     * modifiers still held and not combine it with the dead key */
+    guac_rdp_keyboard_update_modifiers(keyboard, 0,
+            guac_rdp_keyboard_get_modifier_flags(keyboard) & ~modifier_flags);
+
     /* Press base key */
     guac_rdp_keyboard_update_keysym(keyboard, key->base_keysym, 1, GUAC_RDP_KEY_SOURCE_SYNTHETIC);
     guac_rdp_keyboard_update_keysym(keyboard, key->base_keysym, 0, GUAC_RDP_KEY_SOURCE_SYNTHETIC);