From 498ef46cc28bb8a74b1d59f347294da1f5c57143 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Sun, 4 Sep 2011 07:04:43 +0000 Subject: Support other keys than F8 as menu key git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4665 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- vncviewer/Viewport.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'vncviewer/Viewport.cxx') diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 72de8e88..052b593b 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -46,6 +46,7 @@ #include "fltk_layout.h" #include "parameters.h" #include "keysym2ucs.h" +#include "menukey.h" #include "vncviewer.h" #include @@ -938,16 +939,7 @@ void Viewport::popupContextMenu() void Viewport::setMenuKey() { - const char *menuKeyStr; - - menuKeyCode = 0; - - menuKeyStr = menuKey; - if (menuKeyStr[0] == 'F') { - int num = atoi(menuKeyStr + 1); - if ((num >= 1) && (num <= 12)) - menuKeyCode = FL_F + num; - } + menuKeyCode = getMenuKeyCode(); // Need to repopulate the context menu as it contains references to // the menu key -- cgit v1.2.3