From 73a770d8f86dfbfb206ebf7fe1a9417cf85d5df5 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Fri, 18 Sep 2015 22:03:23 -0400
Subject: [PATCH] add option to "Windows" menu to toggle fullscreen

---
 pd/nw/locales/en/translation.json |  1 +
 pd/nw/pd_canvas.html              | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/pd/nw/locales/en/translation.json b/pd/nw/locales/en/translation.json
index 87e16e70f..3df5dacbe 100644
--- a/pd/nw/locales/en/translation.json
+++ b/pd/nw/locales/en/translation.json
@@ -191,6 +191,7 @@
 
     "windows": "Windows",
 
+    "fullscreen": "Fullscreen",
     "nextwin": "Next Window",
     "nextwin_tt": "Give focus to the next open window in the stacking order",
     "prevwin": "Previous Window",
diff --git a/pd/nw/pd_canvas.html b/pd/nw/pd_canvas.html
index 57c9058d4..d66f61372 100644
--- a/pd/nw/pd_canvas.html
+++ b/pd/nw/pd_canvas.html
@@ -1033,6 +1033,19 @@ function nw_create_patch_window_menus (name) {
     }));
 
     // Winman sub-entries
+    winmanMenu.append(new nw.MenuItem({
+        label: l('menu.fullscreen'),
+        click: function() {
+            var win = nw.Window.get();
+            var fullscreen = win.isFullscreen;
+            win.isFullscreen = !fullscreen;
+            pdgui.gui_post("fullscreen is " + fullscreen);
+        },
+        key: "f11",
+        //modifiers: "ctrl",
+        tooltip: l('menu.nextwin_tt'),
+    }));
+
     winmanMenu.append(new nw.MenuItem({
         label: l('menu.nextwin'),
         click: menu_generic,
-- 
GitLab