Beispiel #1
0
        public static uint XConfigureResizeWindow(IntPtr display, IntPtr window, int width, int height)
        {
            var changes = new XWindowChanges
            {
                width  = width,
                height = height
            };

            return(XConfigureWindow(display, window, ChangeWindowFlags.CWHeight | ChangeWindowFlags.CWWidth,
                                    ref changes));
        }
Beispiel #2
0
        /// <summary>
        /// <para>Lower this widget to the bottom of its layer.</para>
        /// </summary>
        public override void Lower()
        {
            if (IsMapped)
            {
                GetGrabWindow().LowerPopup(this);
            }

            try
            {
                IntPtr         display = dpy.Lock();
                XWindowChanges changes = new XWindowChanges();
                changes.stack_mode = 0;                                 /* Above */

                Xlib.XConfigureWindow
                    (display, GetWidgetHandle(),
                    (uint)(ConfigureWindowMask.CWStackMode),
                    ref changes);
            }
            finally
            {
                dpy.Unlock();
            }
        }
Beispiel #3
0
 public static extern uint XConfigureWindow(IntPtr display, IntPtr window, ChangeWindowFlags value_mask,
                                            ref XWindowChanges values);
Beispiel #4
0
 [DllImport(lib, EntryPoint = "XConfigureWindow")]//, CLSCompliant(false)]
 public extern static uint XConfigureWindow(IntPtr display, IntPtr window, ChangeWindowAttributes value_mask, ref XWindowChanges values);
Beispiel #5
0
		public extern static uint XConfigureWindow(IntPtr display, IntPtr window, ChangeWindowFlags value_mask, ref XWindowChanges values);
Beispiel #6
0
            // Dispatch an event to this widget.
            internal override void DispatchEvent(ref XEvent xevent)
            {
                IntPtr  display;
                XWindow child;

                if (xevent.type == Xsharp.Events.EventType.MapRequest)
                {
                    // This may be notification of a new window
                    // that we need to take control of.
                    try
                    {
                        display = dpy.Lock();
                        child   = xevent.xmaprequest.window;
                        if (WantThisWindow(display, child))
                        {
                            // This is the top-level child window that
                            // we have been waiting for.
                            XWindowChanges wc = new XWindowChanges();
                            wc.width        = embedParent.Width;
                            wc.height       = embedParent.Height;
                            wc.border_width = 0;
                            Xlib.XConfigureWindow
                                (display, child,
                                (int)(ConfigureWindowMask.CWWidth |
                                      ConfigureWindowMask.CWHeight |
                                      ConfigureWindowMask.CWBorderWidth),
                                ref wc);
                            Xlib.XReparentWindow
                                (display, child,
                                embedParent.GetWidgetHandle(), 0, 0);
                            Xlib.XMapWindow(display, child);
                            embedParent.child = child;
                        }
                        else
                        {
                            // We don't want this window, or we already
                            // know about it, so replay the map request.
                            Xlib.XMapWindow(display, child);
                        }
                    }
                    finally
                    {
                        dpy.Unlock();
                    }
                }
                else if (xevent.type == Xsharp.Events.EventType.ConfigureRequest)
                {
                    // Replay the configure event direct to the X server.
                    XWindowChanges wc = new XWindowChanges();
                    wc.x            = xevent.xconfigurerequest.x;
                    wc.y            = xevent.xconfigurerequest.y;
                    wc.width        = xevent.xconfigurerequest.width;
                    wc.height       = xevent.xconfigurerequest.height;
                    wc.border_width = xevent.xconfigurerequest.border_width;
                    wc.sibling      = xevent.xconfigurerequest.above;
                    wc.stack_mode   = xevent.xconfigurerequest.detail;
                    try
                    {
                        display = dpy.Lock();
                        Xlib.XConfigureWindow
                            (display,
                            xevent.xconfigurerequest.window,
                            xevent.xconfigurerequest.value_mask, ref wc);
                    }
                    finally
                    {
                        dpy.Unlock();
                    }
                }
                base.DispatchEvent(ref xevent);
            }