more stuff
diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c
index 181cf77..fc89803 100644
--- a/Mac/Modules/win/Winmodule.c
+++ b/Mac/Modules/win/Winmodule.c
@@ -661,7 +661,7 @@
 		return NULL;
 	_rv = FrontWindow();
 	_res = Py_BuildValue("O&",
-	                     WinObj_New, _rv);
+	                     WinObj_WhichWindow, _rv);
 	return _res;
 }
 
@@ -871,3 +871,4 @@
 
 /* ========================= End module Win ========================= */
 
+
diff --git a/Mac/Modules/win/wingen.py b/Mac/Modules/win/wingen.py
index a8c0cc2..0abf6e0 100644
--- a/Mac/Modules/win/wingen.py
+++ b/Mac/Modules/win/wingen.py
@@ -67,7 +67,7 @@
 )
 methods.append(f)
 
-f = Function(WindowPtr, 'FrontWindow',
+f = Function(ExistingWindowPtr, 'FrontWindow',
 )
 functions.append(f)
 
@@ -224,3 +224,5 @@
     (Rect_ptr, 'boundsRect', InMode),
 )
 methods.append(f)
+
+
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index 6ae03f4..8d089a3 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -62,7 +62,11 @@
 			
 			([("WindowPtr", "*", "OutMode")],
 			 [("ExistingWindowPtr", "*", "*")]),
+			
+			([("WindowPtr", "FrontWindow", "ReturnMode")],
+			 [("ExistingWindowPtr", "*", "*")]),
 			]
 
 if __name__ == "__main__":
 	main()
+