commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1024304 - /commons/proper/daemon/trunk/src/native/windows/src/gui.c
Date Tue, 19 Oct 2010 16:10:03 GMT
Author: mturk
Date: Tue Oct 19 16:10:02 2010
New Revision: 1024304

URL: http://svn.apache.org/viewvc?rev=1024304&view=rev
Log:
Properly center the window on the desktop

Modified:
    commons/proper/daemon/trunk/src/native/windows/src/gui.c

Modified: commons/proper/daemon/trunk/src/native/windows/src/gui.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/gui.c?rev=1024304&r1=1024303&r2=1024304&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/gui.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/gui.c Tue Oct 19 16:10:02 2010
@@ -146,7 +146,8 @@ BOOL apxCenterWindow(HWND hwndChild, HWN
     GetWindowRect(hwndChild, &rChild);
     wChild = rChild.right - rChild.left;
     hChild = rChild.bottom - rChild.top;
-
+    if (hwndParent == NULL)
+        hwndParent = GetDesktopWindow();
     /* Get the Height and Width of the parent window */
     GetWindowRect(hwndParent, &rParent);
     wParent = rParent.right - rParent.left;



Mime
View raw message