Module: wine Branch: master Commit: a39659fcc969eb547686e309c9ca4c02b3de13fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=a39659fcc969eb547686e309c9...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Sep 10 16:16:05 2012 +0200
winex11: Disable client-side rendering for OpenGL windows.
---
dlls/winex11.drv/opengl.c | 14 ++++++++++++++ dlls/winex11.drv/window.c | 1 + dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 9c1f6e5..d04791d 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1135,6 +1135,15 @@ static void release_gl_drawable( struct gl_drawable *gl ) if (gl) LeaveCriticalSection( &context_section ); }
+BOOL has_gl_drawable( HWND hwnd ) +{ + struct gl_drawable *gl; + + gl = get_gl_drawable( hwnd, 0 ); + release_gl_drawable( gl ); + return gl != NULL; +} + static GLXContext create_glxcontext(Display *display, struct wgl_context *context, GLXContext shareList) { GLXContext ctx; @@ -3342,6 +3351,11 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) return FALSE; }
+BOOL has_gl_drawable( HWND hwnd ) +{ + return FALSE; +} + void sync_gl_drawable( HWND hwnd, const RECT *visible_rect, const RECT *client_rect ) { } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 8774670..16034ea 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2051,6 +2051,7 @@ void CDECL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flag if (!data->whole_window) return; if (swp_flags & SWP_HIDEWINDOW) return; if (data->whole_window == root_window) return; + if (has_gl_drawable( hwnd )) return; if (!client_side_graphics) return;
surface_rect = get_surface_rect( visible_rect ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 73c89ee..1c4c341 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -558,6 +558,7 @@ extern Window X11DRV_get_whole_window( HWND hwnd ) DECLSPEC_HIDDEN; extern XIC X11DRV_get_ic( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL set_win_format( HWND hwnd, XID fbconfig_id ) DECLSPEC_HIDDEN; +extern BOOL has_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN; extern void sync_gl_drawable( HWND hwnd, const RECT *visible_rect, const RECT *client_rect ) DECLSPEC_HIDDEN; extern void destroy_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN;