From bf2d7049a13f400d615b6c9f793953801696a985 Mon Sep 17 00:00:00 2001 From: emmauss Date: Mon, 26 Oct 2020 22:22:01 +0000 Subject: [PATCH] Merge kb to master (#8) * bump version 1.0.4 * nuget * fix windows keyboard(for real this time) * fix keyboard * update gitignore * fix source files corruption * test * Fix x11 window creation. (#3) Co-authored-by: Emmanuel Co-authored-by: riperiperi --- src/OpenTK/Platform/X11/API.cs | 4 ++-- src/OpenTK/Platform/X11/Functions.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenTK/Platform/X11/API.cs b/src/OpenTK/Platform/X11/API.cs index 5a9f0ee0..a475d015 100644 --- a/src/OpenTK/Platform/X11/API.cs +++ b/src/OpenTK/Platform/X11/API.cs @@ -1323,12 +1323,12 @@ XF86VidModeGetGammaRampSize( { XSetWindowAttributes attr = attributes.Value; return XCreateWindow(display, parent, x, y, width, height, border_width, depth, - (int)@class, visual, (IntPtr)valuemask, &attr); + (int)@class, visual, (IntPtr)valuemask, (IntPtr)(&attr)); } else { return XCreateWindow(display, parent, x, y, width, height, border_width, depth, - (int)@class, visual, (IntPtr)valuemask, null); + (int)@class, visual, (IntPtr)valuemask, (IntPtr)null); } } } diff --git a/src/OpenTK/Platform/X11/Functions.cs b/src/OpenTK/Platform/X11/Functions.cs index 288e306b..efddd8e1 100644 --- a/src/OpenTK/Platform/X11/Functions.cs +++ b/src/OpenTK/Platform/X11/Functions.cs @@ -65,7 +65,7 @@ namespace OpenTK.Platform.X11 public extern static IntPtr XSynchronize(IntPtr display, bool onoff); [DllImport("libX11", EntryPoint = "XCreateWindow")] - public unsafe extern static IntPtr XCreateWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, int depth, int xclass, IntPtr visual, IntPtr valuemask, XSetWindowAttributes* attributes); + public extern static IntPtr XCreateWindow(Display display, Window parent, int x, int y, int width, int height, int borderWidth, int depth, int xclass, IntPtr visual, IntPtr valueMask, IntPtr attributes); [DllImport("libX11", EntryPoint = "XCreateSimpleWindow")]//, CLSCompliant(false)] public extern static IntPtr XCreateSimpleWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, UIntPtr border, UIntPtr background);