Revision: 4580
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4580&view=rev
Author:   ossman_
Date:     2011-07-12 16:02:30 +0000 (Tue, 12 Jul 2011)

Log Message:
-----------
Simplify things by using the handleKeyEvent() method for the fake presses
that can be generated from the popup menu.

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

Modified: trunk/vncviewer/Viewport.cxx
===================================================================
--- trunk/vncviewer/Viewport.cxx        2011-07-12 15:54:25 UTC (rev 4579)
+++ trunk/vncviewer/Viewport.cxx        2011-07-12 16:02:30 UTC (rev 4580)
@@ -762,28 +762,23 @@
     break;
 #endif
   case ID_CTRL:
-    if (!viewOnly)
-      cc->writer()->keyEvent(XK_Control_L, m->value());
+    handleKeyEvent(FL_Control_L, FL_Control_L, "", m->value());
     break;
   case ID_ALT:
-    if (!viewOnly)
-      cc->writer()->keyEvent(XK_Alt_L, m->value());
+    handleKeyEvent(FL_Alt_L, FL_Alt_L, "", m->value());
     break;
   case ID_MENUKEY:
-    if (!viewOnly) {
-      handleKeyEvent(menuKeyCode, menuKeyCode, "", true);
-      handleKeyEvent(menuKeyCode, menuKeyCode, "", false);
-    }
+    handleKeyEvent(menuKeyCode, menuKeyCode, "", true);
+    handleKeyEvent(menuKeyCode, menuKeyCode, "", false);
     break;
   case ID_CTRLALTDEL:
-    if (!viewOnly) {
-      cc->writer()->keyEvent(XK_Control_L, true);
-      cc->writer()->keyEvent(XK_Alt_L, true);
-      cc->writer()->keyEvent(XK_Delete, true);
-      cc->writer()->keyEvent(XK_Delete, false);
-      cc->writer()->keyEvent(XK_Alt_L, false);
-      cc->writer()->keyEvent(XK_Control_L, false);
-    }
+    handleKeyEvent(FL_Control_L, FL_Control_L, "", true);
+    handleKeyEvent(FL_Alt_L, FL_Alt_L, "", true);
+    handleKeyEvent(FL_Delete, FL_Delete, "", true);
+
+    handleKeyEvent(FL_Delete, FL_Delete, "", false);
+    handleKeyEvent(FL_Alt_L, FL_Alt_L, "", false);
+    handleKeyEvent(FL_Control_L, FL_Control_L, "", false);
     break;
   case ID_REFRESH:
     cc->refreshFramebuffer();


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

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to