]> source.dussan.org Git - tigervnc.git/commitdiff
Add minimize button on f8 menu. Fixes #90
authorJoel Teichroeb <joel@teichroeb.net>
Mon, 13 Jul 2015 21:46:22 +0000 (14:46 -0700)
committerJoel Teichroeb <joel@teichroeb.net>
Mon, 13 Jul 2015 21:46:22 +0000 (14:46 -0700)
vncviewer/Viewport.cxx

index ca65acde5060cc6b8c7a78b06372151f0c4a6ed9..e6183bc1d2d4a7a323f7cfcb06428fe0bedafea9 100644 (file)
@@ -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;