Example #1
0
        /// <inheritdoc />
        public override void DispatchPending()
        {
            ThrowIfNotThread(ParentThread);
            var display = DispatchService.Display;

            while (XPending(display) != 0)
            {
                XEvent xevent;
                _ = XNextEvent(display, &xevent);
                XlibWindowService.ForwardWindowEvent(&xevent);
            }
        }
Example #2
0
        internal XlibWindow(XlibWindowService windowService)
            : base(windowService, Thread.CurrentThread)
        {
            _flowDirection    = FlowDirection.TopToBottom;
            _readingDirection = ReadingDirection.LeftToRight;

            _handle     = new ValueLazy <nuint>(CreateWindowHandle);
            _properties = new ValueLazy <PropertySet>(CreateProperties);

            _title        = typeof(XlibWindow).FullName !;
            _bounds       = new Rectangle(float.NaN, float.NaN, float.NaN, float.NaN);
            _clientBounds = new Rectangle(float.NaN, float.NaN, float.NaN, float.NaN);
            _frameExtents = new Rectangle(float.NaN, float.NaN, float.NaN, float.NaN);
            _isEnabled    = true;

            _ = _state.Transition(to: Initialized);
        }