diff --git a/Source/OpenTK/Platform/X11/API.cs b/Source/OpenTK/Platform/X11/API.cs index 89ea729a..1f06000b 100644 --- a/Source/OpenTK/Platform/X11/API.cs +++ b/Source/OpenTK/Platform/X11/API.cs @@ -1219,6 +1219,18 @@ XF86VidModeGetGammaRampSize( #endregion + #region XChangeWindowAttributes + + [DllImport(X11Library)] + internal static extern void XChangeWindowAttributes(Display display, Window w, UIntPtr valuemask, ref XSetWindowAttributes attributes); + + internal static void XChangeWindowAttributes(Display display, Window w, ChangeWindowAttributes valuemask, ref XSetWindowAttributes attributes) + { + XChangeWindowAttributes(display, w, (UIntPtr)valuemask, ref attributes); + } + + #endregion + #region XQueryKeymap /* diff --git a/Source/OpenTK/Platform/X11/Functions.cs b/Source/OpenTK/Platform/X11/Functions.cs index f8906940..0e07ad1c 100644 --- a/Source/OpenTK/Platform/X11/Functions.cs +++ b/Source/OpenTK/Platform/X11/Functions.cs @@ -85,7 +85,7 @@ namespace OpenTK.Platform.X11 public extern static uint XLowerWindow(IntPtr display, IntPtr window); [DllImport("libX11", EntryPoint = "XConfigureWindow"), CLSCompliant(false)] - public extern static uint XConfigureWindow(IntPtr display, IntPtr window, ChangeWindowFlags value_mask, ref XWindowChanges values); + public extern static uint XConfigureWindow(IntPtr display, IntPtr window, ChangeWindowAttributes value_mask, ref XWindowChanges values); [DllImport("libX11", EntryPoint = "XInternAtom")] public extern static IntPtr XInternAtom(IntPtr display, string atom_name, bool only_if_exists); diff --git a/Source/OpenTK/Platform/X11/Structs.cs b/Source/OpenTK/Platform/X11/Structs.cs index c1764db2..a9522bff 100644 --- a/Source/OpenTK/Platform/X11/Structs.cs +++ b/Source/OpenTK/Platform/X11/Structs.cs @@ -998,15 +998,31 @@ namespace OpenTK.Platform.X11 } [Flags] - public enum ChangeWindowFlags + public enum ChangeWindowAttributes { - CWX = 1 << 0, - CWY = 1 << 1, - CWWidth = 1 << 2, - CWHeight = 1 << 3, - CWBorderWidth = 1 << 4, - CWSibling = 1 << 5, - CWStackMode = 1 << 6 + X = 1 << 0, + Y = 1 << 1, + Width = 1 << 2, + Height = 1 << 3, + BorderWidth = 1 << 4, + Sibling = 1 << 5, + StackMode = 1 << 6, + + //BackPixmap (1L<<0) + //BackPixel (1L<<1) + //SaveUnder (1L<<10) + //EventMask (1L<<11) + //DontPropagate (1L<<12) + //Colormap (1L<<13) + //Cursor (1L<<14) + //BorderPixmap (1L<<2) + //BorderPixel (1L<<3) + //BitGravity (1L<<4) + //WinGravity (1L<<5) + //BackingStore (1L<<6) + //BackingPlanes (1L<<7) + //BackingPixel (1L<<8) + OverrideRedirect = 1<<9, } public enum StackMode diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index a02361ce..4d4ee5c4 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -716,6 +716,10 @@ namespace OpenTK.Platform.X11 Functions.XSetTransientForHint(this.window.Display, this.Handle, this.window.RootWindow); Functions.XUnmapWindow(this.window.Display, this.Handle); Functions.XMapWindow(this.window.Display, this.Handle); + + XSetWindowAttributes attr = new XSetWindowAttributes(); + attr.override_redirect = true; + Functions.XChangeWindowAttributes(this.window.Display, this.Handle, ChangeWindowAttributes.OverrideRedirect, ref attr); } }