Author: KirkMcDonald
Date: 2008-01-02 06:22:04 +0000 (Wed, 02 Jan 2008)
New Revision: 715

Modified:
   trunk/pysoy/src/_core-w32/Window.pxi
   trunk/pysoy/src/_core-w32/_windowproc.pxi
   trunk/pysoy/src/_core-w32/support.c
Log:
Better fullscreen support.

Modified: trunk/pysoy/src/_core-w32/Window.pxi
===================================================================
--- trunk/pysoy/src/_core-w32/Window.pxi        2008-01-02 06:19:45 UTC (rev 
714)
+++ trunk/pysoy/src/_core-w32/Window.pxi        2008-01-02 06:22:04 UTC (rev 
715)
@@ -209,7 +209,7 @@
 
   cdef void _resize(self, int width, int height) :
     cdef int i
-    #stdio.printf("Window._resize(%d, %d)", width, height)
+    #stdio.printf("Window._resize(%d, %d)\n", width, height)
     if self._width == width and self._height == height :
       # Ignore redundant resize events
       return

Modified: trunk/pysoy/src/_core-w32/_windowproc.pxi
===================================================================
--- trunk/pysoy/src/_core-w32/_windowproc.pxi   2008-01-02 06:19:45 UTC (rev 
714)
+++ trunk/pysoy/src/_core-w32/_windowproc.pxi   2008-01-02 06:22:04 UTC (rev 
715)
@@ -24,6 +24,7 @@
   for i from 0 <= i < _windows.current:
     if (<Window> _windows.list[i])._window == hwnd:
       return (<Window> _windows.list[i])
+  return None
 
 cdef windows.LRESULT __stdcall _window_proc(
   windows.HWND hwnd,
@@ -33,10 +34,14 @@
 ):
   cdef Window w
   cdef int i
-  #stdio.printf("WindowProc, msg %d, hwnd %x\n", msg, hwnd)
-  #stdio.printf("WindowProc, thread %d\n", windows.GetCurrentThreadId())
   if msg == windows.WM_SIZE:
     w = _get_window(hwnd)
+    if w is None:
+      return 0
+    #stdio.printf("WindowProc, msg %d, hwnd %x\n", msg, hwnd)
+    #stdio.printf("WindowProc, thread %d\n", windows.GetCurrentThreadId())
+    #stdio.printf("WindowProc: Got WM_SIZE\n")
+    #stdio.printf("WindowProc: w: %x, width: %d, height: %d\n", <void *>w, 
windows.LOWORD(lParam), windows.HIWORD(lParam))
     w._resize(windows.LOWORD(lParam), windows.HIWORD(lParam))
     return 0
   elif msg == windows.WM_CHAR:

Modified: trunk/pysoy/src/_core-w32/support.c
===================================================================
--- trunk/pysoy/src/_core-w32/support.c 2008-01-02 06:19:45 UTC (rev 714)
+++ trunk/pysoy/src/_core-w32/support.c 2008-01-02 06:22:04 UTC (rev 715)
@@ -68,7 +68,7 @@
     rect.bottom = height;
     if (fullscreen) {
         exStyle = WS_EX_APPWINDOW;
-        style = WS_OVERLAPPED;
+        style = WS_POPUP;
     } else {
         exStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
         style = WS_OVERLAPPEDWINDOW;

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to