Implement menu entry for forced refresh of screen.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4392 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 2ce788f..c8713b8 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -56,7 +56,8 @@
// Menu constants
-enum { ID_EXIT, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL, ID_DISMISS };
+enum { ID_EXIT, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL,
+ ID_REFRESH, ID_DISMISS };
Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_)
: Fl_Widget(0, 0, w, h), cc(cc_), frameBuffer(NULL), pixelTrans(NULL),
@@ -520,6 +521,8 @@
contextMenu->add("Secret shortcut menu key", FL_F + 8, NULL, (void*)ID_MENUKEY, FL_MENU_INVISIBLE); // Broken, see STR2613
contextMenu->add(_("Send Ctrl-Alt-Del"), 0, NULL, (void*)ID_CTRLALTDEL, FL_MENU_DIVIDER);
+ contextMenu->add(_("Refresh screen"), 0, NULL, (void*)ID_REFRESH, FL_MENU_DIVIDER);
+
contextMenu->add(_("Dismiss menu"), 0, NULL, (void*)ID_DISMISS, 0);
}
@@ -563,6 +566,9 @@
cc->writer()->keyEvent(XK_Control_L, false);
}
break;
+ case ID_REFRESH:
+ cc->refreshFramebuffer();
+ break;
case ID_DISMISS:
// Don't need to do anything
break;