You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2010/10/19 18:10:03 UTC

svn commit: r1024304 - /commons/proper/daemon/trunk/src/native/windows/src/gui.c

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;