diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js
index f19b371f44f35149b0bfac934de8b4a5eca39c2b..174e7cfb0a3eda7118f95764bd99cc40d5dae8ef 100644
--- a/pd/nw/pd_canvas.js
+++ b/pd/nw/pd_canvas.js
@@ -398,6 +398,16 @@ var canvas_events = (function() {
     gui.Window.get().on("close", function() {
         pdgui.pdsend(name, "menuclose 0");
     });
+    gui.Window.get().on("maximize", function() {
+        pdgui.gui_canvas_getscroll(name);
+    });
+    gui.Window.get().on("unmaximize", function() {
+        pdgui.gui_canvas_getscroll(name);
+    });
+    gui.Window.get().on("resize", function() {
+        pdgui.gui_canvas_getscroll(name);
+    });
+
 
     return {
         none: function() {
diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index 0897bc38e39cee706725f6ba9eaed60bf3197e54..8060fd410ed60ef230497a83f75389e794b7895a 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -3160,6 +3160,8 @@ function gui_canvas_getscroll(cid) {
     getscroll_var = setTimeout(do_getscroll, 250, cid);
 }
 
+exports.gui_canvas_getscroll = gui_canvas_getscroll;
+
 // handling the selection
 function gui_lower(cid, tag) {
     var svg = patchwin[cid].window.document.getElementById("patchsvg"),