diff options
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r-- | src/QuickMedia.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index a7bea3c..9c786a7 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -720,7 +720,8 @@ namespace QuickMedia { window_create_params.max_size = window_size; } window_create_params.hidden = no_dialog; - window_create_params.parent_window = parent_window; + window_create_params.parent_window = is_download ? 0 : parent_window; + window_create_params.transient_for_window = is_download ? parent_window : 0; window_create_params.background_color = get_theme().background_color; window_create_params.class_name = "quickmedia"; window_create_params.window_type = is_download ? MGL_WINDOW_TYPE_DIALOG : MGL_WINDOW_TYPE_NORMAL; @@ -3102,7 +3103,7 @@ namespace QuickMedia { separate_audio_option = false; if(!separate_audio_option) { - download_async_gui(url, file_manager_start_dir.string(), no_video, filename, download_no_dialog); + download_async_gui(url, file_manager_start_dir.string(), no_video, filename, download_no_dialog, window.get_system_handle()); return; } @@ -3132,7 +3133,7 @@ namespace QuickMedia { if(!selected) return; - download_async_gui(url, file_manager_start_dir.string(), audio_only, filename, download_no_dialog); + download_async_gui(url, file_manager_start_dir.string(), audio_only, filename, download_no_dialog, window.get_system_handle()); } bool Program::video_download_if_non_streamable(std::string &video_url, std::string &audio_url, bool &is_audio_only, bool &has_embedded_audio, PageType previous_page) { @@ -4952,7 +4953,7 @@ namespace QuickMedia { } else if(event.key.code == mgl::Keyboard::S && event.key.control) { BodyItem *selected_item = thread_body->get_selected(); if(selected_item && !selected_item->url.empty()) - download_async_gui(selected_item->url, file_manager_start_dir.string(), false, "", event.key.shift); + download_async_gui(selected_item->url, file_manager_start_dir.string(), false, "", event.key.shift, window.get_system_handle()); } BodyItem *selected_item = thread_body->get_selected(); @@ -5069,7 +5070,7 @@ namespace QuickMedia { redraw = true; frame_skip_text_entry = true; } else if(event.key.code == mgl::Keyboard::S && event.key.control) { - download_async_gui(attached_image_url, file_manager_start_dir.string(), false, "", event.key.shift); + download_async_gui(attached_image_url, file_manager_start_dir.string(), false, "", event.key.shift, window.get_system_handle()); } } } @@ -6790,7 +6791,7 @@ namespace QuickMedia { avatar_applied = false; return true; } else if(message_type == MessageType::FILE) { - download_async_gui(selected->url, file_manager_start_dir.string(), no_video, filename, false); + download_async_gui(selected->url, file_manager_start_dir.string(), no_video, filename, false, window.get_system_handle()); return true; } @@ -6854,7 +6855,7 @@ namespace QuickMedia { else if(string_starts_with(filename, file_prefix)) filename.erase(filename.begin(), filename.begin() + strlen(file_prefix)); - download_async_gui(selected->url, file_manager_start_dir.string(), no_video, filename, no_dialog); + download_async_gui(selected->url, file_manager_start_dir.string(), no_video, filename, no_dialog, window.get_system_handle()); return true; } } |