From a7494ac195d7e7caa0db7f0b21100b50eff76bc4 Mon Sep 17 00:00:00 2001 From: Joel Teichroeb Date: Mon, 13 Jul 2015 14:46:22 -0700 Subject: [PATCH] Add minimize button on f8 menu. Fixes #90 --- vncviewer/Viewport.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index ca65acde..e6183bc1 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -94,7 +94,7 @@ static rfb::LogWriter vlog("Viewport"); // Menu constants -enum { ID_EXIT, ID_FULLSCREEN, ID_RESIZE, +enum { ID_EXIT, ID_FULLSCREEN, ID_MINIMIZE, ID_RESIZE, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL, ID_REFRESH, ID_OPTIONS, ID_INFO, ID_ABOUT, ID_DISMISS }; @@ -793,6 +793,8 @@ void Viewport::initContextMenu() fltk_menu_add(contextMenu, _("&Full screen"), 0, NULL, (void*)ID_FULLSCREEN, FL_MENU_TOGGLE | (window()->fullscreen_active()?FL_MENU_VALUE:0)); + fltk_menu_add(contextMenu, _("Minimi&ze"), 0, NULL, + (void*)ID_MINIMIZE, 0); fltk_menu_add(contextMenu, _("Resize &window to session"), 0, NULL, (void*)ID_RESIZE, (window()->fullscreen_active()?FL_MENU_INACTIVE:0) | @@ -865,6 +867,8 @@ void Viewport::popupContextMenu() else ((DesktopWindow*)window())->fullscreen_on(); break; + case ID_MINIMIZE: + window()->iconize(); case ID_RESIZE: if (window()->fullscreen_active()) break; -- 2.39.5