From 628c06077c1cca57dffc2d050f957e0417be8df1 Mon Sep 17 00:00:00 2001 From: Rasmus Michelsen Date: Tue, 14 Apr 2020 18:36:57 +0200 Subject: [PATCH] Fixed display relative top-left coordinates --- src/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.rs b/src/window.rs index 691d125..e76adb2 100644 --- a/src/window.rs +++ b/src/window.rs @@ -203,7 +203,7 @@ impl WindowWrapper { // Set window to fullscreen self.window.set_size(rect.width(), rect.height()).unwrap(); - self.window.set_position(sdl2::video::WindowPos::Positioned(0), sdl2::video::WindowPos::Positioned(0)); + self.window.set_position(sdl2::video::WindowPos::Positioned(rect.x()), sdl2::video::WindowPos::Positioned(rect.y())); self.window.set_bordered(true); } }