aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-11 02:47:16 +0100
committerdec05eba <dec05eba@protonmail.com>2022-03-11 02:47:16 +0100
commit8c142359fd27d73fc6c77dc5d1bd4df831f7c0c1 (patch)
tree915d6d69f7609d571906043e137e6d60af151ea4 /include
parent2b29acfb9f70cb7aff7d5da1f5fc59ee319e3606 (diff)
Fix video player focus (in dwm, it would cause focus spam)
Diffstat (limited to 'include')
-rw-r--r--include/QuickMedia.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index d7680ff..1fda7a3 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -112,7 +112,7 @@ namespace QuickMedia {
void set_clipboard(const std::string &str);
private:
- void init(unsigned long parent_window, std::string &program_path);
+ void init(mgl::WindowHandle parent_window, std::string &program_path);
void load_plugin_by_name(std::vector<Tab> &tabs, int &start_tab_index, FileManagerMimeType fm_mime_type, FileSelectionHandler file_selection_handler, std::string instance);
void common_event_handler(mgl::Event &event);
void handle_x11_events();
@@ -126,6 +126,8 @@ namespace QuickMedia {
using PageLoopSubmitHandler = std::function<void(const std::vector<Tab> &new_tabs)>;
// Returns false if the page loop was escaped by user navigation (pressing escape) or if there was an error at startup
bool page_loop(std::vector<Tab> &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr, bool go_to_previous_on_escape = true);
+ void redirect_focus_to_video_player_window(mgl::WindowHandle video_player_window);
+ void show_video_player_window(mgl::WindowHandle video_player_window);
void video_page_download_video(const std::string &url, mgl::WindowHandle video_player_window = 0);
bool video_download_if_non_streamable(std::string &video_url, std::string &audio_url, bool &is_audio_only, bool &has_embedded_audio, PageType previous_page);
int video_get_max_height();