Revision: 5115
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5115&view=rev
Author:   ossman_
Date:     2013-05-29 12:33:59 +0000 (Wed, 29 May 2013)
Log Message:
-----------
The numpad decimal hack is needed on OS X as well.

Modified Paths:
--------------
    trunk/vncviewer/Viewport.cxx

Modified: trunk/vncviewer/Viewport.cxx
===================================================================
--- trunk/vncviewer/Viewport.cxx        2013-05-24 10:50:26 UTC (rev 5114)
+++ trunk/vncviewer/Viewport.cxx        2013-05-29 12:33:59 UTC (rev 5115)
@@ -594,13 +594,20 @@
   }
 #endif
 
-#ifdef WIN32
+#if defined(WIN32) || defined(__APPLE__)
   // X11 fairly consistently uses XK_KP_Separator for comma and
-  // XK_KP_Decimal for period. Windows unfortunately is terribly
-  // inconcistent, and is not something that's likely to change:
+  // XK_KP_Decimal for period. Windows and OS X are a different matter
+  // though.
+  //
+  // OS X will consistently generate the same key code no matter what
+  // layout is being used.
+  //
+  // Windows is terribly inconcistent, and is not something that's
+  // likely to change:
   // http://blogs.msdn.com/michkap/archive/2006/09/13/752377.aspx
-  // To work around this we look at what character the key generates
-  // and try to follow X11 behaviour.
+  //
+  // To get X11 behaviour, we instead look at the text generated by
+  // they key.
   if ((keyCode == (FL_KP + ',')) || (keyCode == (FL_KP + '.'))) {
     switch (keyText[0]) {
     case ',':

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