Exemple #1
0
        void UpdateMotifHints()
        {
            var functions = MotifFunctions.Move | MotifFunctions.Close | MotifFunctions.Resize |
                            MotifFunctions.Minimize | MotifFunctions.Maximize;
            var decorations = MotifDecorations.Menu | MotifDecorations.Title | MotifDecorations.Border |
                              MotifDecorations.Maximize | MotifDecorations.Minimize | MotifDecorations.ResizeH;

            if (_popup ||
                _systemDecorations == SystemDecorations.None)
            {
                decorations = 0;
            }

            if (!_canResize)
            {
                functions   &= ~(MotifFunctions.Resize | MotifFunctions.Maximize);
                decorations &= ~(MotifDecorations.Maximize | MotifDecorations.ResizeH);
            }

            var hints = new MotifWmHints
            {
                flags       = new IntPtr((int)(MotifFlags.Decorations | MotifFlags.Functions)),
                decorations = new IntPtr((int)decorations),
                functions   = new IntPtr((int)functions)
            };

            XChangeProperty(_x11.Display, _handle,
                            _x11.Atoms._MOTIF_WM_HINTS, _x11.Atoms._MOTIF_WM_HINTS, 32,
                            PropertyMode.Replace, ref hints, 5);
        }
Exemple #2
0
 public static extern int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type,
                                          int format, PropertyMode mode, ref MotifWmHints data, int nelements);
Exemple #3
0
		public extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref MotifWmHints data, int nelements);