Browse Source

Fixed tooltip issue on Windows.

merge-requests/365/head
U-olece-PC\olece 10 years ago
parent
commit
eedb344d7e
  1. 5
      src/source.cc
  2. 2
      src/source.h

5
src/source.cc

@ -794,6 +794,7 @@ void Source::ClangViewParse::update_types() {
}
bool Source::ClangViewParse::on_motion_notify_event(GdkEventMotion* event) {
if(on_motion_last_x!=event->x || on_motion_last_y!=event->y) {
delayed_tooltips_connection.disconnect();
if(clang_readable && event->state==0) {
Gdk::Rectangle rectangle(event->x, event->y, 1, 1);
@ -805,7 +806,9 @@ bool Source::ClangViewParse::on_motion_notify_event(GdkEventMotion* event) {
type_tooltips.hide();
diagnostic_tooltips.hide();
}
}
on_motion_last_x=event->x;
on_motion_last_y=event->y;
return Source::View::on_motion_notify_event(event);
}

2
src/source.h

@ -132,6 +132,8 @@ namespace Source {
Tooltips diagnostic_tooltips;
Tooltips type_tooltips;
bool on_motion_notify_event(GdkEventMotion* event);
gdouble on_motion_last_x;
gdouble on_motion_last_y;
void on_mark_set(const Gtk::TextBuffer::iterator& iterator, const Glib::RefPtr<Gtk::TextBuffer::Mark>& mark);
bool on_scroll_event(GdkEventScroll* event);

Loading…
Cancel
Save