diff --git a/apps/file-browser.c b/apps/file-browser.c index b53b4e71..979b2165 100644 --- a/apps/file-browser.c +++ b/apps/file-browser.c @@ -190,24 +190,18 @@ static void _menu_action_up(struct MenuEntry * entry) { static void _menu_action_help(struct MenuEntry * entry) { /* show help documentation */ - if (!fork()) { - system("help-browser file-browser.trt"); - exit(0); - } + system("help-browser file-browser.trt &"); redraw_window(); } static void _menu_action_about(struct MenuEntry * entry) { /* Show About dialog */ - if (!fork()) { - char about_cmd[1024] = "\0"; - strcat(about_cmd, "about \"About File Browser\" /usr/share/icons/48/folder.bmp \"ToaruOS File Browser\" \"(C) 2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://gitlab.com/toaruos\" "); - char coords[100]; - sprintf(coords, "%d %d", (int)main_window->x + (int)main_window->width / 2, (int)main_window->y + (int)main_window->height / 2); - strcat(about_cmd, coords); - system(about_cmd); - exit(0); - } + char about_cmd[1024] = "\0"; + strcat(about_cmd, "about \"About File Browser\" /usr/share/icons/48/folder.bmp \"ToaruOS File Browser\" \"(C) 2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://gitlab.com/toaruos\" "); + char coords[100]; + sprintf(coords, "%d %d &", (int)main_window->x + (int)main_window->width / 2, (int)main_window->y + (int)main_window->height / 2); + strcat(about_cmd, coords); + system(about_cmd); redraw_window(); } diff --git a/apps/help-browser.c b/apps/help-browser.c index c6188643..4c7e2748 100644 --- a/apps/help-browser.c +++ b/apps/help-browser.c @@ -106,15 +106,12 @@ static void _menu_action_forward(struct MenuEntry * entry) { static void _menu_action_about(struct MenuEntry * entry) { /* Show About dialog */ - if (!fork()) { - char about_cmd[1024] = "\0"; - strcat(about_cmd, "about \"About Help Browser\" /usr/share/icons/48/help.bmp \"ToaruOS Help Browser\" \"(C) 2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://gitlab.com/toarus\" "); - char coords[100]; - sprintf(coords, "%d %d", (int)main_window->x + (int)main_window->width / 2, (int)main_window->y + (int)main_window->height / 2); - strcat(about_cmd, coords); - system(about_cmd); - exit(0); - } + char about_cmd[1024] = "\0"; + strcat(about_cmd, "about \"About Help Browser\" /usr/share/icons/48/help.bmp \"ToaruOS Help Browser\" \"(C) 2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://gitlab.com/toarus\" "); + char coords[100]; + sprintf(coords, "%d %d &", (int)main_window->x + (int)main_window->width / 2, (int)main_window->y + (int)main_window->height / 2); + strcat(about_cmd, coords); + system(about_cmd); redraw_window(); } diff --git a/apps/terminal.c b/apps/terminal.c index 7e0852ff..f295a89c 100644 --- a/apps/terminal.c +++ b/apps/terminal.c @@ -1764,23 +1764,17 @@ void _menu_action_toggle_sdf(struct MenuEntry * self) { } void _menu_action_show_about(struct MenuEntry * self) { - if (!fork()) { - char about_cmd[1024] = "\0"; - strcat(about_cmd, "about \"About Terminal\" /usr/share/icons/48/utilities-terminal.bmp \"ToaruOS Terminal\" \"(C) 2013-2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://gitlab.com/toaruos\" "); - char coords[100]; - sprintf(coords, "%d %d", (int)window->x + (int)window->width / 2, (int)window->y + (int)window->height / 2); - strcat(about_cmd, coords); - system(about_cmd); - exit(0); - } + char about_cmd[1024] = "\0"; + strcat(about_cmd, "about \"About Terminal\" /usr/share/icons/48/utilities-terminal.bmp \"ToaruOS Terminal\" \"(C) 2013-2018 K. Lange\n-\nPart of ToaruOS, which is free software\nreleased under the NCSA/University of Illinois\nlicense.\n-\n%https://toaruos.org\n%https://gitlab.com/toaruos\" "); + char coords[100]; + sprintf(coords, "%d %d &", (int)window->x + (int)window->width / 2, (int)window->y + (int)window->height / 2); + strcat(about_cmd, coords); + system(about_cmd); render_decors(); } void _menu_action_show_help(struct MenuEntry * self) { - if (!fork()) { - system("help-browser terminal.trt"); - exit(0); - } + system("help-browser terminal.trt &"); render_decors(); }