Skip to content

Some GUI regression fixes backported from DISIS Pd-l2ork.

Albert Gräf requested to merge aggraef/purr-data:gui-fixes into master

I have noticed these, too. They are really annoying, but Ico's downstream has them fixed, so we can just adopt the relevant parts of these commits. See:

The first two are Mac-specific, the third bug applies to all platforms.

  • Cmd+Q not actually quitting after replying "no" to a save prompt. This is at odds with the behavior on other platforms. We need to actually call pdgui.menu_quit() in the appropriate handler after the last patch window was closed and we're about to quit. (That call doesn't seem to be needed on Linux and Windows, but it doesn't seem to do any harm there either.)

  • Patch window growing vertically after each save. There was actually code in place to mitigate this, but it was explicitly disabled on macOS (probably because on the Mac we have the global menu, and thus there is no menu bar on the canvas?). Reenabling it makes this bug go away, though. Maybe this is due to a bug in nw.js which is still present in the latest nw.js 0.71 release?

  • Subpatch window forgets its geometry when closed and re-opened. Fixed by calling canvas_check_geometry in the close event and menu option, as we already do in the save and saveas menu options.

NB: The second change with the menu offset hack seems a little dubious to me, this probably needs revisiting. Why would we account for the menu offset in canvas_check_geometry on the Mac, when we don't do this in index.js:gui.Window.open? Nevertheless, this change makes the Mac-only grow-on-save bug go away, so we want to keep this for now.

Merge request reports