aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-17 10:50:33 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-17 10:50:33 +0100
commitf34d8522a1008667bb90b16e644697d109b4701b (patch)
tree5485aba5b575dd080e2e933db494905b70383e8b /src
parent453eac7f1f5ef70390ec51087fc1f190811a7507 (diff)
Fix broken ctrl+r for videos (dont map video player window)
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) {