diff options
author | speidy <speidy@gmail.com> | 2014-05-20 01:40:30 +0300 |
---|---|---|
committer | speidy <speidy@gmail.com> | 2014-05-20 01:40:30 +0300 |
commit | 37987a842b0bc8997c0a017fd948e74c398968e2 (patch) | |
tree | c0a5cb3c9d129feb4cea024083a53035d099b696 /neutrinordp | |
parent | 89cbe76f574602c1340b7f86a06a3fafcb486c48 (diff) | |
download | xrdp-proprietary-37987a842b0bc8997c0a017fd948e74c398968e2.tar.gz xrdp-proprietary-37987a842b0bc8997c0a017fd948e74c398968e2.zip |
merge ArvidN
Diffstat (limited to 'neutrinordp')
-rw-r--r-- | neutrinordp/xrdp-neutrinordp.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c index ec33bbb5..d559b59d 100644 --- a/neutrinordp/xrdp-neutrinordp.c +++ b/neutrinordp/xrdp-neutrinordp.c @@ -195,14 +195,33 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, switch (msg) { case 15: /* key down */ + /* Before we handle the first character we synchronize + capslock and numlock. */ + /* We collect the state during the first synchronize + ( see msg 17) */ + if (!mod->bool_keyBoardSynced) + { + LLOGLN(11, ("Additional Sync event handled : %d", mod->keyBoardLockInfo)); + mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo); + mod->bool_keyBoardSynced = 1; + } mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3); break; case 16: /* key up */ mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3); break; - case 17: /*Synchronize*/ - LLOGLN(11, ("Synchronized event handled")); - mod->inst->input->SynchronizeEvent(mod->inst->input, 0); + case 17: /* Synchronize */ + LLOGLN(11, ("Synchronized event handled : %d",param1)); + /* In some situations the Synchronize event come to early. + Therefore we store this information and use it when we + receive the first keyboard event + Without this fix numlock and capslock can come + out of sync. */ + mod->inst->input->SynchronizeEvent(mod->inst->input, param1); + if (!mod->bool_keyBoardSynced) + { + mod->keyBoardLockInfo = param1; + } break; case 100: /* mouse move */ LLOGLN(12, ("mouse move %d %d", param1, param2)); @@ -256,13 +275,11 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, case 107: /* wheel up */ flags = PTR_FLAGS_WHEEL | 0x0078; mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0); - break; case 108: break; case 109: /* wheel down */ flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0); - break; case 110: break; case 200: |