Added visual for InputOnly window X11Input
This commit is contained in:
parent
499e36ae94
commit
3c5797b15c
5 changed files with 9 additions and 11 deletions
|
@ -141,10 +141,9 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public void ProcessEvents()
|
public void ProcessEvents()
|
||||||
{
|
{
|
||||||
// Do nothing, the WndProc is automatically notified of new events.
|
// Do nothing, the WndProc is automatically notified of new events (sub-classing magic).
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IMouseDriver Members
|
#region IMouseDriver Members
|
||||||
|
|
|
@ -23,11 +23,13 @@ namespace OpenTK.Platform.X11
|
||||||
private IntPtr rootWindow, handle, topLevelWindow, display;
|
private IntPtr rootWindow, handle, topLevelWindow, display;
|
||||||
private int screen;
|
private int screen;
|
||||||
private WindowInfo parent;
|
private WindowInfo parent;
|
||||||
|
private VisualInfo visinfo;
|
||||||
|
|
||||||
internal IntPtr RootWindow { get { return rootWindow; } set { rootWindow = value; } }
|
internal IntPtr RootWindow { get { return rootWindow; } set { rootWindow = value; } }
|
||||||
internal IntPtr TopLevelWindow { get { return topLevelWindow; } set { topLevelWindow = value; } }
|
internal IntPtr TopLevelWindow { get { return topLevelWindow; } set { topLevelWindow = value; } }
|
||||||
internal IntPtr Display { get { return display; } set { display = value; } }
|
internal IntPtr Display { get { return display; } set { display = value; } }
|
||||||
internal int Screen { get { return screen; } set { screen = value; } }
|
internal int Screen { get { return screen; } set { screen = value; } }
|
||||||
|
internal VisualInfo VisualInfo { get { return visinfo; } set { visinfo = value; } }
|
||||||
|
|
||||||
public IntPtr Handle { get { return handle; } internal set { handle = value; } }
|
public IntPtr Handle { get { return handle; } internal set { handle = value; } }
|
||||||
public IWindowInfo Parent { get { return parent; } internal set { parent = value as WindowInfo; } }
|
public IWindowInfo Parent { get { return parent; } internal set { parent = value as WindowInfo; } }
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
#region public void CreateVisual()
|
#region public void CreateVisual()
|
||||||
|
|
||||||
public void CreateVisual()
|
internal VisualInfo CreateVisual()
|
||||||
{
|
{
|
||||||
Debug.WriteLine("Creating visual.");
|
Debug.WriteLine("Creating visual.");
|
||||||
Debug.Indent();
|
Debug.Indent();
|
||||||
|
@ -244,6 +244,8 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
Debug.Print("done! (id: {0})", x11context);
|
Debug.Print("done! (id: {0})", x11context);
|
||||||
Debug.Unindent();
|
Debug.Unindent();
|
||||||
|
|
||||||
|
return visualInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -99,7 +99,7 @@ namespace OpenTK.Platform.X11
|
||||||
);
|
);
|
||||||
|
|
||||||
glContext = new X11GLContext(info, mode);
|
glContext = new X11GLContext(info, mode);
|
||||||
glContext.CreateVisual();
|
info.VisualInfo = glContext.CreateVisual();
|
||||||
|
|
||||||
// Create a window on this display using the visual above
|
// Create a window on this display using the visual above
|
||||||
Debug.Write("Creating output window... ");
|
Debug.Write("Creating output window... ");
|
||||||
|
|
|
@ -56,14 +56,9 @@ namespace OpenTK.Platform.X11
|
||||||
window.Parent.Handle,
|
window.Parent.Handle,
|
||||||
0, 0,
|
0, 0,
|
||||||
1, 1,
|
1, 1,
|
||||||
0,
|
0, 0,
|
||||||
//glxVisualInfo.depth,
|
|
||||||
//glContext.XVisualInfo.depth,
|
|
||||||
0,
|
|
||||||
Constants.InputOnly,
|
Constants.InputOnly,
|
||||||
//glxVisualInfo.visual,
|
window.VisualInfo.visual,
|
||||||
//glContext.XVisualInfo.visual,
|
|
||||||
IntPtr.Zero,
|
|
||||||
cw_mask,
|
cw_mask,
|
||||||
wnd_attributes
|
wnd_attributes
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue