Alexandre Julliard : user32: Store the pixel format in the window structure .

Alexandre Julliard julliard at winehq.org
Tue Oct 9 13:12:34 CDT 2012


Module: wine
Branch: master
Commit: cf799f585246767bad892d6975752b05ca09bfdc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cf799f585246767bad892d6975752b05ca09bfdc

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct  9 09:51:29 2012 +0200

user32: Store the pixel format in the window structure.

---

 dlls/user32/win.c |   10 ++++++++++
 dlls/user32/win.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index a8882c3..7da4972 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -3599,6 +3599,16 @@ BOOL WINAPI SwitchDesktop( HDESK hDesktop)
  */
 BOOL CDECL __wine_set_pixel_format( HWND hwnd, int format )
 {
+    WND *win = WIN_GetPtr( hwnd );
+
+    if (!win || win == WND_DESKTOP || win == WND_OTHER_PROCESS)
+    {
+        WARN( "setting format %d on win %p not supported\n", format, hwnd );
+        return FALSE;
+    }
+    win->pixel_format = format;
+    WIN_ReleasePtr( win );
+
     update_window_state( hwnd );
     return TRUE;
 }
diff --git a/dlls/user32/win.h b/dlls/user32/win.h
index b35fc00..a19ebe9 100644
--- a/dlls/user32/win.h
+++ b/dlls/user32/win.h
@@ -62,6 +62,7 @@ typedef struct tagWND
     HICON          hIconSmall;    /* window's small icon */
     struct window_surface *surface; /* Window surface if any */
     struct tagDIALOGINFO *dlgInfo;/* Dialog additional info (dialogs only) */
+    int            pixel_format;  /* Pixel format set by the graphics driver */
     int            cbWndExtra;    /* class cbWndExtra at window creation */
     DWORD_PTR      userdata;      /* User private data */
     DWORD          wExtra[1];     /* Window extra bytes */




More information about the wine-cvs mailing list