Added XChangeWindowAttributes / trying to get gnome panels to hide.

This commit is contained in:
the_fiddler 2008-01-27 16:34:45 +00:00
parent 02cf500a2a
commit 24c78747af
4 changed files with 41 additions and 9 deletions

View file

@ -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
/*

View file

@ -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);

View file

@ -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

View file

@ -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);
}
}