Revision: 5118
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5118&view=rev
Author:   ossman_
Date:     2013-05-30 14:48:20 +0000 (Thu, 30 May 2013)
Log Message:
-----------
Simplify the lookup of alternative keysyms.

Modified Paths:
--------------
    trunk/unix/xserver/hw/vnc/Input.cc

Modified: trunk/unix/xserver/hw/vnc/Input.cc
===================================================================
--- trunk/unix/xserver/hw/vnc/Input.cc  2013-05-30 14:47:17 UTC (rev 5117)
+++ trunk/unix/xserver/hw/vnc/Input.cc  2013-05-30 14:48:20 UTC (rev 5118)
@@ -475,18 +475,18 @@
        /* Try some equivalent keysyms if we couldn't find a perfect match */
        if (keycode == 0) {
                for (i = 0;i < sizeof(altKeysym)/sizeof(altKeysym[0]);i++) {
-                       if (altKeysym[i].a == keysym) {
-                               keycode = keysymToKeycode(altKeysym[i].b,
-                                                         state, &new_state);
-                               if (keycode != 0)
-                                       break;
-                       }
-                       if (altKeysym[i].b == keysym) {
-                               keycode = keysymToKeycode(altKeysym[i].a,
-                                                         state, &new_state);
-                               if (keycode != 0)
-                                       break;
-                       }
+                       KeySym altsym;
+
+                       if (altKeysym[i].a == keysym)
+                               altsym = altKeysym[i].b;
+                       else if (altKeysym[i].b == keysym)
+                               altsym = altKeysym[i].a;
+                       else
+                               continue;
+
+                       keycode = keysymToKeycode(altsym, state, &new_state);
+                       if (keycode != 0)
+                               break;
                }
        }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to