File xrdp-tab-from-mstsc-updated.patch of Package xrdp

From 51b00e68f4f062cae1dd413b551bda722310c022 Mon Sep 17 00:00:00 2001
From: Felix Zhang <fezhang@suse.com>
Date: Wed, 16 Apr 2014 15:53:21 +0800
Subject: [PATCH 7/7] xrdp-tab-from-mstsc-updated.patch

---
 xrdp/xrdp_wm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index db1eec1..bddd127 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -1175,6 +1175,7 @@ xrdp_wm_key(struct xrdp_wm* self, int device_flags, int scan_code)
 {
   int msg;
   struct xrdp_key_info* ki;
+  static int last_key_status = -1;
 
   /*g_printf("count %d\n", self->key_down_list->count);*/
   scan_code = scan_code % 128;
@@ -1215,7 +1216,7 @@ xrdp_wm_key(struct xrdp_wm* self, int device_flags, int scan_code)
            &(self->keymap));
       if (ki != 0)
       {
-        if ((scan_code == 15) && (device_flags == KBD_FLAG_UP))
+        if ((last_key_status != WM_KEYDOWN) && (scan_code == 15) && (device_flags == KBD_FLAG_UP))
         {
           g_writeln("Don't track Tab keys from Windows when Max/Min or Move the rdp client window.\n");
         }
@@ -1230,6 +1231,7 @@ xrdp_wm_key(struct xrdp_wm* self, int device_flags, int scan_code)
     xrdp_bitmap_def_proc(self->focused_window,
                          msg, scan_code, device_flags);
   }
+  last_key_status = msg;
   return 0;
 }
 
-- 
1.7.12.4
openSUSE Build Service is sponsored by