From 3b1458784942574222f8fea5b2ab2f8accaac6b8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 6 Jul 2021 19:01:35 +0200 Subject: Respond to x11 ping (should fix gnome unresponsive application detection) --- include/QuickMedia.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/QuickMedia.hpp') diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index 7078791..cc4a10f 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -103,8 +103,7 @@ namespace QuickMedia { private: void init(Window 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); - // Returns true if the window was closed - bool handle_window_close(); + void handle_x11_events(); void base_event_handler(sf::Event &event, PageType previous_page, Body *body, SearchBar *search_bar, bool handle_key_press = true, bool handle_searchbar = true); void event_idle_handler(const sf::Event &event); void idle_active_handler(); @@ -202,9 +201,11 @@ namespace QuickMedia { sf::Clock idle_timer; bool idle = true; bool low_cpu_mode = false; + bool window_closed = false; std::string pipe_selected_text; Window x11_window = None; Atom wm_delete_window_atom; + Atom net_wm_ping_atom; XEvent xev; std::filesystem::path file_manager_start_dir; std::string youtube_url; -- cgit v1.2.3