Beispiel #1
0
 static void Insensitive_Unrealized(object obj, EventArgs args)
 {
     Gdk.Window win = (Gdk.Window)map[obj];
     win.Destroy();
     map.Remove(obj);
     map.Remove(win);
 }
Beispiel #2
0
        protected override void OnUnrealized()
        {
            bin_window.Destroy();
            bin_window = null;

            base.OnUnrealized();
        }
Beispiel #3
0
 static void DestroySplitter()
 {
     if (splitter != null)
     {
         splitter.Hide();
         splitter.Destroy();
         splitter = null;
     }
 }
Beispiel #4
0
        protected override void OnUnrealized()
        {
            IsRealized = false;

            event_window.UserData = IntPtr.Zero;
            event_window.Destroy();
            event_window = null;

            base.OnUnrealized();
        }
Beispiel #5
0
        protected override void OnUnrealized()
        {
            if (d_window != null)
            {
                d_window.UserData = IntPtr.Zero;
                d_window.Destroy();
                d_window = null;
            }

            gtk_widget_set_realized(Handle, false);
        }
Beispiel #6
0
        protected override void OnUnrealized()
        {
            if (titleWindow != null)
            {
                titleWindow.UserData = IntPtr.Zero;
                titleWindow.Destroy();
                titleWindow = null;
            }

            base.OnUnrealized();
        }
Beispiel #7
0
        public static void WindowDestroy(Gdk.Window window)
        {
            // There is a bug in GDK, and subsequently in Gdk# 2.8.5 through 2.12.1
            // where the managed Gdk.Window.Destroy function does not obtain a
            // normal reference (non-toggle) on the GdkWindow before calling
            // _destroy on it, which the native function apparently expects.

            // https://bugzilla.novell.com/show_bug.cgi?id=382186
            // http://anonsvn.mono-project.com/viewcvs/trunk/gtk-sharp/gdk/Window.custom?rev=101734&r1=42529&r2=101734

            if (window == null)
            {
                return;
            }

            if (!toggle_ref_supported)
            {
                window.Destroy();
                return;
            }

            // If this ever happens I will move out west and start farming...
            if (g_object_ref == null || gdk_window_destroy == null)
            {
                window.Destroy();
                return;
            }

            if (invoke_args == null)
            {
                invoke_args = new object[1];
            }

            invoke_args[0] = window.Handle;
            g_object_ref.Invoke(null, invoke_args);
            gdk_window_destroy.Invoke(null, invoke_args);

            window.Dispose();
        }
Beispiel #8
0
 public static void Remove(Widget wrapper)
 {
     Gtk.Widget widget = wrapper.Wrapped;
     Gdk.Window win    = (Gdk.Window)map[widget];
     if (win != null)
     {
         map.Remove(widget);
         map.Remove(win);
         win.Destroy();
     }
     widget.SizeAllocated -= Insensitive_SizeAllocate;
     widget.Realized      -= Insensitive_Realized;
     widget.Unrealized    -= Insensitive_Unrealized;
     widget.Mapped        -= Insensitive_Mapped;
     widget.Unmapped      -= Insensitive_Unmapped;
 }