--- xwin.cvs/windialogs.c	2004-01-25 19:04:11.265625000 -0800
+++ xwin/windialogs.c	2004-01-26 18:29:04.734375000 -0800
@@ -43,6 +43,36 @@
 
 
 /*
+ * Center a dialog window in the desktop window
+ */
+static void
+winCenterDialog (HWND hwndDlg)
+{
+  HWND hwndDesk; 
+  RECT rc, rcDlg, rcDesk; 
+ 
+  hwndDesk = GetParent (hwndDlg);
+  if (!hwndDesk)
+    hwndDesk = GetDesktopWindow (); 
+  
+  GetWindowRect (hwndDesk, &rcDesk); 
+  GetWindowRect (hwndDlg, &rcDlg); 
+  CopyRect (&rc, &rcDesk); 
+  
+  OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top); 
+  OffsetRect (&rc, -rc.left, -rc.top); 
+  OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom); 
+  
+  SetWindowPos (hwndDlg, 
+		HWND_TOP, 
+		rcDesk.left + (rc.right / 2), 
+		rcDesk.top + (rc.bottom / 2), 
+		0, 0,
+		SWP_NOSIZE | SWP_NOZORDER); 
+}
+
+
+/*
  * Display the Exit dialog box
  */
 
@@ -110,6 +140,8 @@
       s_pScreenInfo = s_pScreenPriv->pScreenInfo;
       s_pScreen = s_pScreenInfo->pScreen;
 
+      winCenterDialog( hDialog );
+
       /* Set icon to standard app icon */
       PostMessage (hDialog,
 		   WM_SETICON,
@@ -258,6 +290,8 @@
 	      s_pScreenInfo->dwBPP,
 	      s_pScreenPriv->dwLastWindowsBitsPixel);
 #endif
+      
+      winCenterDialog( hwndDialog );
 
       /* Set icon to standard app icon */
       PostMessage (hwndDialog,
