Skip to content

SDL2 Doesn't Respect WindowOptions.Position Member #1862

@tilkinsc

Description

@tilkinsc

Summary

It seems that SDL2 windows open at the same exact position every time. With the same exact code on GLFW I do not experience this issue.

Steps to reproduce

  • Platform: Windows
  • Framework Version: .NET Core 8.0
  • API: OpenGL (highest supported is 4.6)
<ItemGroup>
	<PackageReference Include="Silk.NET.Windowing" Version="2.20.0" />
	<PackageReference Include="Silk.NET.OpenGL" Version="2.20.0" />
	<PackageReference Include="Silk.NET.Input" Version="2.20.0" />
</ItemGroup>
public static void Main(string[] args)
{
	Window.PrioritizeSdl();
	
	WindowOptions options = WindowOptions.Default;
	options.Samples = config.Window.Samples;
	options.Size = new(800, 600);
	options.Position = new(1000, 400);
	options.Title = "Example";
	
	window = Window.Create(options);
	window.Load += OnLoad; // set up IInputContext, GL.GetApi(window)
	window.Render += OnRender; // glClear
	window.Update += OnUpdate; // empty
	window.Closing += OnClose; // key == Key.Escape window.Close()
	
	window.Run();
	window.Dispose();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions