From 5de75971d99782b1afd5b6905c8d38d6531a944b Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 20 Aug 2018 08:45:30 +0200 Subject: [PATCH] Language protocol: no longer shows tooltips when view is not in focus --- src/source_language_protocol.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/source_language_protocol.cc b/src/source_language_protocol.cc index 97c755b..487619c 100644 --- a/src/source_language_protocol.cc +++ b/src/source_language_protocol.cc @@ -1,6 +1,7 @@ #include "source_language_protocol.h" #include "filesystem.h" #include "info.h" +#include "notebook.h" #include "project.h" #include "selection_dialog.h" #include "terminal.h" @@ -1028,6 +1029,8 @@ void Source::LanguageProtocolView::show_type_tooltips(const Gdk::Rectangle &rect dispatcher.post([this, offset, content, current_request] { if(current_request != request_count) return; + if(Notebook::get().get_current_view() != this) + return; if(offset >= get_buffer()->get_char_count()) return; type_tooltips.clear();