GNOME Bugzilla – Bug 725873
Fix the Win32 backend for newer Visual Studio Versions
Last modified: 2014-03-08 10:41:24 UTC
Hi, When using the Win32 backend and when built with Visual Studio 2012 and later, Clutter has an issue where Clutter programs will have their windows shrink automatically upon launching, where the program becomes unusable. As it turns out, this has something to do with differences in how GetSystemMetrics() work for Visual Studio 2012 and later[1]. The GDK backend, which also runs on Windows, however, is not affected by this. [1]:http://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
Created attachment 271169 [details] [review] Fix the Win32 backend for newer Visual Studio versions Hi, This patch attempts to address this issue when running the Win32 backend built by Visual Studio 2012 and later, by using AdjustWindowRectEx(). Unfortunately, as this would cause the window to continually expand upon running the program on Visual Studio 2008 and 2010 (and possibly MinGW), this could not be used to replace the current code path of using GetSystemMetrics() for the width and height of the Window. Please note that GetSystemMetrics (SM_CYCAPTION) is not affected by this issue. p.s. This problem would hit all releases of Clutter, unfortunately, not just 1.17/1.18. With blessings, thank you!
Review of attachment 271169 [details] [review]: looks okay from a cursory glance, and since you've been testing it, I assume it works.
Hello Emmanuele, Thanks for the review, the patch was pushed as: master: ae58ad8c clutter-1.18: c1fd29df clutter-1.16: 293f35ef With blessings, thank you!