Skip to content

Commit

Permalink
Merge pull request #164 from CyberThink777/master
Browse files Browse the repository at this point in the history
Linux file open / save dialog appearing behind main window FIX
  • Loading branch information
rooklift authored Jul 10, 2021
2 parents 8666eb9 + 833b5ee commit 92ee9c9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function menu_build() {
label: "Open PGN...",
accelerator: "CommandOrControl+O",
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.pgn_dialog_folder,
properties: ["openFile"],
filters: [{name: "PGN", extensions: ["pgn"]}, {name: "All files", extensions: ["*"]}]
Expand Down Expand Up @@ -319,7 +319,7 @@ function menu_build() {
alert(messages.save_not_enabled);
return;
}
let file = save_dialog({defaultPath: config.pgn_dialog_folder});
let file = save_dialog(win, {defaultPath: config.pgn_dialog_folder});
if (typeof file === "string" && file.length > 0) {
win.webContents.send("call", {
fn: "save",
Expand Down Expand Up @@ -1504,7 +1504,7 @@ function menu_build() {
{
label: "Choose pieces folder...",
click: () => {
let folders = open_dialog({
let folders = open_dialog(win, {
defaultPath: config.pieces_dialog_folder,
properties: ["openDirectory"]
});
Expand Down Expand Up @@ -1549,7 +1549,7 @@ function menu_build() {
{
label: "Choose background image...",
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.background_dialog_folder,
properties: ["openFile"]
});
Expand Down Expand Up @@ -2133,7 +2133,7 @@ function menu_build() {
type: "checkbox",
checked: false,
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.engine_dialog_folder,
properties: ["openFile"]
});
Expand Down Expand Up @@ -2173,7 +2173,7 @@ function menu_build() {
type: "checkbox",
checked: false,
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.weights_dialog_folder,
properties: ["openFile"]
});
Expand Down Expand Up @@ -2203,7 +2203,7 @@ function menu_build() {
type: "checkbox",
checked: false,
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.evalfile_dialog_folder,
properties: ["openFile"]
});
Expand Down Expand Up @@ -2427,7 +2427,7 @@ function menu_build() {
type: "checkbox",
checked: false,
click: () => {
let folders = open_dialog({
let folders = open_dialog(win, {
defaultPath: config.syzygy_dialog_folder,
properties: ["openDirectory"]
});
Expand Down Expand Up @@ -3294,7 +3294,7 @@ function menu_build() {
type: "checkbox",
checked: false,
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.book_dialog_folder,
properties: ["openFile"],
filters: [{name: "Polyglot", extensions: ["bin"]}, {name: "All files", extensions: ["*"]}]
Expand Down Expand Up @@ -3322,7 +3322,7 @@ function menu_build() {
type: "checkbox",
checked: false,
click: () => {
let files = open_dialog({
let files = open_dialog(win, {
defaultPath: config.book_dialog_folder,
properties: ["openFile"],
filters: [{name: "PGN", extensions: ["pgn"]}, {name: "All files", extensions: ["*"]}]
Expand Down Expand Up @@ -4019,7 +4019,7 @@ function menu_build() {
type: "checkbox",
checked: typeof config.logfile === "string" && config.logfile !== "",
click: () => {
let file = save_dialog();
let file = save_dialog(win, {});
if (typeof file === "string" && file.length > 0) {
win.webContents.send("call", {
fn: "set_logfile",
Expand Down

0 comments on commit 92ee9c9

Please sign in to comment.