Ejemplo n.º 1
0
        /// <summary> Dispose by parent. </summary>
        public override void DisposeByParent()
        {
            if (_hasOwnWindow)
            {
                if (_window == IntPtr.Zero)
                {
                    return;
                }

                // Step 1:
                // =======

                // Stop event listening.
                X11lib.XSelectInput(_display, _window, EventMask.NoEventMask);

                // Unmap from display.
                X11lib.XUnmapWindow(_display, _window);

                // Step 2:
                // =======

                // Free shared ressources.
                base.DisposeByParent();

                // Step 3:
                // =======

                // Destroy window resources.
                X11lib.XDestroyWindow(_display, _window);
                _window = IntPtr.Zero;
            }
            else
            {
                base.DisposeByParent();
            }
        }