From 2dcee99981e39047bf36f2ed562b6ed3603a9dde Mon Sep 17 00:00:00 2001 From: DYefremov Date: Sat, 13 Feb 2021 12:31:58 +0300 Subject: [PATCH] preventing tooltips for an inactive window --- app/ui/main_app_window.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index c9397e30..43c33147 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -1052,6 +1052,9 @@ class Application(Gtk.Application): def on_fav_view_query_tooltip(self, view, x, y, keyboard_mode, tooltip): """ Sets detailed info about service in the tooltip [fav view]. """ + if not self._main_window.is_active(): + return False + result = view.get_dest_row_at_pos(x, y) if not result or not self._settings.show_bq_hints: return False @@ -1060,6 +1063,9 @@ class Application(Gtk.Application): def on_services_view_query_tooltip(self, view, x, y, keyboard_mode, tooltip): """ Sets short info about service in the tooltip [main services view]. """ + if not self._main_window.is_active(): + return False + result = view.get_dest_row_at_pos(x, y) if not result or not self._settings.show_srv_hints: return False