summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-05-26 14:14:06 +0000
committerPierre Ossman <ossman@cendio.se>2011-05-26 14:14:06 +0000
commit4c613d30e8eaf8609e9b82b1785a96a53036bfac (patch)
tree153018afbfa2b9a7c859365e203da98eafaa0504 /vncviewer
parent1b3789cc8b93120325c034303ce0cbde157ddf3a (diff)
downloadtigervnc-4c613d30e8eaf8609e9b82b1785a96a53036bfac.tar.gz
tigervnc-4c613d30e8eaf8609e9b82b1785a96a53036bfac.zip
Implement full screen support in new vncviewer.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4447 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/Viewport.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 4470a31e..1dff1021 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -55,7 +55,7 @@ static rfb::LogWriter vlog("Viewport");
// Menu constants
-enum { ID_EXIT, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL,
+enum { ID_EXIT, ID_FULLSCREEN, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL,
ID_REFRESH, ID_OPTIONS, ID_INFO, ID_ABOUT, ID_DISMISS };
Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_)
@@ -570,6 +570,10 @@ void Viewport::initContextMenu()
contextMenu->add(_("Exit viewer"), 0, NULL, (void*)ID_EXIT, FL_MENU_DIVIDER);
+#ifdef HAVE_FLTK_FULLSCREEN
+ contextMenu->add(_("Full screen"), 0, NULL, (void*)ID_FULLSCREEN, FL_MENU_DIVIDER);
+#endif
+
contextMenu->add(_("Ctrl"), 0, NULL, (void*)ID_CTRL, FL_MENU_TOGGLE);
contextMenu->add(_("Alt"), 0, NULL, (void*)ID_ALT, FL_MENU_TOGGLE);
@@ -607,6 +611,14 @@ void Viewport::popupContextMenu()
case ID_EXIT:
exit_vncviewer();
break;
+#ifdef HAVE_FLTK_FULLSCREEN
+ case ID_FULLSCREEN:
+ if (window()->fullscreen_active())
+ window()->fullscreen_off();
+ else
+ window()->fullscreen();
+ break;
+#endif
case ID_CTRL:
if (!viewOnly)
cc->writer()->keyEvent(XK_Control_L, m->value());