Commit 35b1a52b authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Give window focus when asking if we need to save before closing. Using a...

Give window focus when asking if we need to save before closing. Using a (possibly buggy) "restore" method instead of the more obvious "focus" method, so this needs more testing
parent 841209ed
......@@ -520,15 +520,11 @@ function canvas_menuclose_callback(cid_for_dialog, cid, force) {
no_button.onclick = function() {
patchwin[cid_for_dialog].window.canvas_events.close_without_saving(cid, force);
};
// Boy does this seem wrong-- restore() brings the window to the front of
// the stacking order. But that is really the job of focus(). This works
// under Ubuntu-- need to test it on OSX...
patchwin[cid_for_dialog].restore();
dialog.showModal();
// reply = patchwin[cid_for_dialog].window
// .confirm("Save changes to " + title + "?");
// if (reply) {
// pdsend(cid_for_dialog + " menusave");
// } else {
// pdsend(cid_for_dialog + " dirty 0");
// pdsend(cid + " menuclose " + force);
// }
}
function gui_canvas_menuclose(cid_for_dialog, cid, force) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment