aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-07-12 16:02:30 +0000
committerPierre Ossman <ossman@cendio.se>2011-07-12 16:02:30 +0000
commit991b4fe852ecb246eefe3f595fc7a406bc019876 (patch)
treea287d3ee3f78b2f6819c483755c570972278f824 /vncviewer/Viewport.cxx
parent39ceb508884c437f8d40d411b6ae68a70b908391 (diff)
downloadtigervnc-991b4fe852ecb246eefe3f595fc7a406bc019876.tar.gz
tigervnc-991b4fe852ecb246eefe3f595fc7a406bc019876.zip
Simplify things by using the handleKeyEvent() method for the fake presses
that can be generated from the popup menu. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4580 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r--vncviewer/Viewport.cxx27
1 files changed, 11 insertions, 16 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 5ff9bf46..770f1279 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -762,28 +762,23 @@ void Viewport::popupContextMenu()
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();