After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725873 - Fix the Win32 backend for newer Visual Studio Versions
Fix the Win32 backend for newer Visual Studio Versions
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: win32
1.17.x
Other Windows
: Normal major
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-07 04:35 UTC by Fan, Chun-wei
Modified: 2014-03-08 10:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the Win32 backend for newer Visual Studio versions (2.61 KB, patch)
2014-03-07 04:40 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2014-03-07 04:35:32 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
Comment 1 Fan, Chun-wei 2014-03-07 04:40:52 UTC
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!
Comment 2 Emmanuele Bassi (:ebassi) 2014-03-07 14:42:55 UTC
Review of attachment 271169 [details] [review]:

looks okay from a cursory glance, and since you've been testing it, I assume it works.
Comment 3 Fan, Chun-wei 2014-03-08 10:40:57 UTC
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!