aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 1a7f67a..c735f55 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -3061,11 +3061,11 @@ namespace QuickMedia {
return true;
});
- XMapWindow(disp, video_player_window);
- XSync(disp, False);
-
- if(task_result == TaskResult::CANCEL)
+ if(task_result == TaskResult::CANCEL) {
+ XMapWindow(disp, video_player_window);
+ XSync(disp, False);
cancelled = true;
+ }
}
if(!cancelled) {
@@ -3073,9 +3073,6 @@ namespace QuickMedia {
window.set_cursor_visible(true);
cursor_visible = true;
- XUnmapWindow(disp, video_player_window);
- XSync(disp, False);
-
std::vector<Tab> related_pages;
TaskResult related_pages_result = run_task_with_loading_screen([&video_page, &related_videos, &channel_url, &related_pages]{
return video_page->get_related_pages(related_videos, channel_url, related_pages) == PluginResult::OK;
@@ -3086,10 +3083,6 @@ namespace QuickMedia {
XSync(disp, False);
show_notification("QuickMedia", "Failed to get related pages", Urgency::CRITICAL);
} else if(related_pages_result == TaskResult::TRUE) {
- XMapWindow(disp, video_player_window);
- XSync(disp, False);
- XFlush(disp);
-
bool page_changed = false;
double resume_start_time = 0.0;
page_loop(related_pages, video_page->get_related_pages_first_tab(), [&](const std::vector<Tab> &new_tabs) {