From 8c142359fd27d73fc6c77dc5d1bd4df831f7c0c1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 11 Mar 2022 02:47:16 +0100 Subject: Fix video player focus (in dwm, it would cause focus spam) --- include/QuickMedia.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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 &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 &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 &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(); -- cgit v1.2.3-70-g09d2