# FLTK STR #2638
check_cxx_source_compiles("#include <FL/Enumerations.H>\nint main(int c, char** v) { return FL_Volume_Down; }" HAVE_FLTK_MEDIAKEYS)
+ # FLTK STR #2641
+ check_cxx_source_compiles("#include <FL/Enumerations.H>\nint main(int c, char** v) { return FL_FULLSCREEN; }" HAVE_FLTK_FULLSCREEN)
+
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
#cmakedefine HAVE_FLTK_DEAD_KEYS
#cmakedefine HAVE_FLTK_CLIPBOARD
#cmakedefine HAVE_FLTK_MEDIAKEYS
+#cmakedefine HAVE_FLTK_FULLSCREEN
#cmakedefine ENABLE_NLS 1
/* MS Visual Studio 2008 and newer doesn't know ssize_t */
// 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_)
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);
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());