コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }