Skip to content

Commit

Permalink
fix tooltip following mouse on updates if x/y are not given
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed Feb 26, 2023
1 parent 8dcb4b6 commit 4cca710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/gtk/tooltip.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class Cmd::Gtk::Gui::Tooltip < Cmd::Base
if thread.settings.coord_mode_tooltip == ::Run::CoordMode::RELATIVE
x, y = Cmd::X11::Window::Util.coord_relative_to_screen(thread, x.not_nil!, y.not_nil!)
end
tooltip.move x.not_nil!, y.not_nil!
else
x, y = thread.runner.display.x_do.mouse_location
end
tooltip.move x.not_nil!, y.not_nil!
tooltip.show_all
end
else
Expand Down

0 comments on commit 4cca710

Please sign in to comment.