Exemplo n.º 1
0
        static Delegate TryBindGtkInternals(WindowTransparencyDecorator instance)
        {
            if (internalBindingTried)
            {
                if (!internalBindingWorks)
                {
                    return(null);
                }
            }
            else
            {
                internalBindingTried = true;
            }

            try {
                Type delType = typeof(Gtk.Widget).Assembly.GetType("GtkSharp.KeySnoopFuncNative");
                System.Reflection.MethodInfo met = typeof(WindowTransparencyDecorator).GetMethod("TransparencyKeySnooper",
                                                                                                 System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
                Delegate ret = Delegate.CreateDelegate(delType, instance, met);
                if (ret != null)
                {
                    return(ret);
                }
            } catch {}

            internalBindingWorks = false;
            //MonoDevelop.Core.LoggingService.LogWarning ("GTK# API has changed, and control-transparency will not be available for popups");
            return(null);
        }
Exemplo n.º 2
0
 protected override void OnDestroyed()
 {
     base.OnDestroyed ();
     if (decorator != null) {
         decorator.Detach ();
         decorator = null;
     }
 }
Exemplo n.º 3
0
 protected override void OnDestroyed()
 {
     base.OnDestroyed();
     if (decorator !=  null)
     {
           {
             decorator.Detach();
             decorator =  null;
         }
     }
 }
Exemplo n.º 4
0
		static Delegate TryBindGtkInternals (WindowTransparencyDecorator instance)
		{
			if (internalBindingTried) {
				if (!internalBindingWorks)
					return null;
			} else {
				internalBindingTried = true;
			}
			
			try {
				Type delType = typeof(Gtk.Widget).Assembly.GetType ("GtkSharp.KeySnoopFuncNative");
				System.Reflection.MethodInfo met = typeof (WindowTransparencyDecorator).GetMethod ("TransparencyKeySnooper", 
				    System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
				Delegate ret = Delegate.CreateDelegate (delType, instance, met);
				if (ret != null)
					return ret;
			} catch {}
			
			internalBindingWorks = false;
			//MonoDevelop.Core.LoggingService.LogWarning ("GTK# API has changed, and control-transparency will not be available for popups");
			return null;
		}