From: WonYoung Choi Date: Mon, 1 Oct 2018 02:11:42 +0000 (+0900) Subject: [Tizen] Skip pumping events when creating window (#4) X-Git-Tag: submit/tizen/20181001.021745^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=273c2d4f8d5e2f8bf6facd51c8afdf58329fa69b;p=platform%2Fcore%2Fcsapi%2Fopentk.git [Tizen] Skip pumping events when creating window (#4) --- diff --git a/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs index 45f15e92..a89e484a 100644 --- a/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs +++ b/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs @@ -100,7 +100,9 @@ namespace OpenTK.Platform.SDL2 handle = SDL.CreateWindow(title, bounds.Left + x, bounds.Top + y, width, height, flags); exists = true; } +#if !TIZEN ProcessEvents(); +#endif window = new Sdl2WindowInfo(handle, null); window_id = SDL.GetWindowID(handle); windows.Add(window_id, this); diff --git a/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs b/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs index 5b2bca08..6aacc655 100644 --- a/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs +++ b/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs @@ -49,6 +49,8 @@ namespace OpenTK.Platform.Tizen public override void Run(string[] args) { + base.Run(args); + lock (SDL2.SDL.Sync) { SDL2.SDL.AddEventWatch(EventFilterDelegate, IntPtr.Zero); @@ -77,7 +79,7 @@ namespace OpenTK.Platform.Tizen } } - private bool OnCreateNative() + private void OnCreateNative() { if (Handlers.ContainsKey(EventType.PreCreated)) { @@ -96,7 +98,6 @@ namespace OpenTK.Platform.Tizen var handler = Handlers[EventType.Created] as Action; handler?.Invoke(); } - return true; } private unsafe int OnHandleSDLAppEvent(IntPtr data, IntPtr e)