Browse Source

Viewport cancels existing tooltip when window looses focus

fixes #68197

when NOTIFICATION_WM_WINDOW_FOCUS_OUT is recieved by a viewport it will now call
_gui_cancel_tooltip() to avoid it hanging around after the mouse events stop
coming in
grimmr 2 years ago
parent
commit
aa9b5b917f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      scene/main/viewport.cpp

+ 1 - 0
scene/main/viewport.cpp

@@ -491,6 +491,7 @@ void Viewport::_notification(int p_what) {
 		} break;
 
 		case NOTIFICATION_WM_WINDOW_FOCUS_OUT: {
+			_gui_cancel_tooltip();
 			_drop_physics_mouseover();
 			if (gui.mouse_focus && !gui.forced_mouse_focus) {
 				_drop_mouse_focus();