diff options
-rw-r--r-- | src/Program.c | 2 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Program.c b/src/Program.c index 65164c4..47b0e33 100644 --- a/src/Program.c +++ b/src/Program.c @@ -27,6 +27,8 @@ int exec_program(const char **args, ProgramOutputCallback output_callback, void pid_t pid = fork(); if(pid == -1) { perror("Failed to fork"); + close(fd[READ_END]); + close(fd[WRITE_END]); return -3; } else if(pid == 0) { /* child */ if(prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 42e018d..99d713e 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -706,10 +706,11 @@ namespace QuickMedia { const float width_per_tab = window_size.x / tabs.size(); const float tab_y = tab_spacer_height + std::floor(search_bar->getBottomWithoutShadow() + tab_height * 0.5f - (tab_text_size + 5.0f) * 0.5f); sf::RectangleShape tab_background(sf::Vector2f(std::floor(width_per_tab), tab_height)); + + tabs[selected_tab].body->draw(window, body_pos, body_size); int i = 0; for(Tab &tab : tabs) { if(i == selected_tab) { - tab.body->draw(window, body_pos, body_size); tab_background.setFillColor(tab_selected_color); } else { tab_background.setFillColor(tab_unselected_color); |