public virtual bool TryCloseTooltipWindow(Window tipWindow, TooltipCloseReason reason) { if (tipWindow.nativeWidget is Gtk.Widget gtkWidget) { gtkWidget.Destroy(); } else if (tipWindow.nativeWidget is IDisposable disposable) { disposable.Dispose(); } tipWindow.Dispose(); return(true); }
public override bool TryCloseTooltipWindow(Window tipWindow, TooltipCloseReason reason) { var window = (LanguageItemWindow)tipWindow; if (window.Tag is FloatingQuickFixIconWidget iconWidget) { if (reason != TooltipCloseReason.Force && iconWidget.IsMouseNear()) { return(false); } iconWidget.QueueDestroy(reason == TooltipCloseReason.Force ? 0u : 500); } else { window.Destroy(); } return(true); }