From 6013905e7277473310968cd6ddb9fc9a03434d3f Mon Sep 17 00:00:00 2001 From: Andrew Mickelson Date: Fri, 22 May 2015 23:46:57 -0700 Subject: [PATCH] [Windows] Issue #128 - Fix multiple monitors on Windows --- src/fe_base.cpp | 4 ++-- src/fe_window.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fe_base.cpp b/src/fe_base.cpp index ba58193ca..596032ec5 100644 --- a/src/fe_base.cpp +++ b/src/fe_base.cpp @@ -26,8 +26,8 @@ #include #define FE_NAME_D "Attract-Mode" -#define FE_VERSION_D "1.5.2" -const int FE_VERSION_NUM = 152; +#define FE_VERSION_D "1.5.3" +const int FE_VERSION_NUM = 153; const char *FE_NAME = FE_NAME_D; const char *FE_COPYRIGHT = FE_NAME_D " " FE_VERSION_D \ diff --git a/src/fe_window.cpp b/src/fe_window.cpp index 742c0b8ee..503806475 100644 --- a/src/fe_window.cpp +++ b/src/fe_window.cpp @@ -124,6 +124,9 @@ void FeWindow::onCreate() SetWindowPos(hw, HWND_TOP, left, top, width, height, SWP_FRAMECHANGED); + // As of 2.1, SFML caches the window size. We call setSize below to update SFML appropriately + setSize( sf::Vector2u( width, height ) ); + ShowWindow(hw, SW_SHOW); SetFocus( hw ); #endif