private bool DisableMotifDecorations() { using (new XLock(this.window.Display)) { IntPtr num = Functions.XInternAtom(this.window.Display, "_MOTIF_WM_HINTS", true); if (!(num != IntPtr.Zero)) { return(false); } MotifWmHints data = new MotifWmHints(); data.flags = (IntPtr)2L; Functions.XChangeProperty(this.window.Display, this.Handle, num, num, 32, PropertyMode.Replace, ref data, Marshal.SizeOf((object)data) / IntPtr.Size); return(true); } }
public extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref MotifWmHints data, int nelements);
bool EnableMotifDecorations() { using (new XLock(window.Display)) { IntPtr atom = Functions.XInternAtom(this.window.Display, MOTIF_WM_ATOM, true); if (atom != IntPtr.Zero) { //Functions.XDeleteProperty(this.window.Display, this.Handle, atom); MotifWmHints hints = new MotifWmHints(); hints.flags = (IntPtr)MotifFlags.Decorations; hints.decorations = (IntPtr)MotifDecorations.All; Functions.XChangeProperty(this.window.Display, this.Handle, atom, atom, 32, PropertyMode.Replace, ref hints, Marshal.SizeOf(hints) / IntPtr.Size); return true; } return false; } }
bool DisableMotifDecorations() { IntPtr atom = Functions.XInternAtom(this.window.Display, MOTIF_WM_ATOM, true); if (atom != IntPtr.Zero) { //Functions.XGetWindowProperty(window.Display, window.WindowHandle, atom, IntPtr.Zero, IntPtr.Zero, false, MotifWmHints hints = new MotifWmHints(); hints.flags = (IntPtr)MotifFlags.Decorations; Functions.XChangeProperty(this.window.Display, this.Handle, atom, atom, 32, PropertyMode.Replace, ref hints, Marshal.SizeOf(hints) / IntPtr.Size); return true; } return false; }
private bool EnableMotifDecorations() { using (new XLock(this.window.Display)) { IntPtr num = Functions.XInternAtom(this.window.Display, "_MOTIF_WM_HINTS", true); if (!(num != IntPtr.Zero)) return false; MotifWmHints data = new MotifWmHints(); data.flags = (IntPtr) 2L; data.decorations = (IntPtr) 1L; Functions.XChangeProperty(this.window.Display, this.Handle, num, num, 32, PropertyMode.Replace, ref data, Marshal.SizeOf((object) data) / IntPtr.Size); return true; } }