winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2012
----- 2025 -----
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
960 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Allow changing the pixel format of a window from a different thread.
by Alexandre Julliard
03 Oct '12
03 Oct '12
Module: wine Branch: master Commit: 4ac1a5ac608bad7111f7cb99170a3be99b5059f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ac1a5ac608bad7111f7cb991…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 3 11:19:10 2012 +0200 winex11: Allow changing the pixel format of a window from a different thread. --- dlls/winex11.drv/opengl.c | 47 ++++++-------------------------------------- dlls/winex11.drv/window.c | 2 - dlls/winex11.drv/x11drv.h | 2 - 3 files changed, 7 insertions(+), 44 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 3e68131..20591e2 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1062,20 +1062,6 @@ static const struct wgl_pixel_format *get_pixel_format(Display *display, int iPi return NULL; } -static int pixelformat_from_fbconfig_id(XID fbconfig_id) -{ - int i; - - if (!fbconfig_id) return 0; - - for (i = 0; i < nb_pixel_formats; i++) - if (pixel_formats[i].fmt_id == fbconfig_id) return i + 1; - - /* This will happen on hwnds without a pixel format set; it's ok */ - return 0; -} - - /* Mark any allocated context using the glx drawable 'old' to use 'new' */ static void mark_drawable_dirty(Drawable old, Drawable new) { @@ -1182,18 +1168,15 @@ static void free_gl_drawable( struct gl_drawable *gl ) /*********************************************************************** * set_win_format */ -BOOL set_win_format( HWND hwnd, XID fbconfig_id ) +static BOOL set_win_format( HWND hwnd, const struct wgl_pixel_format *format ) { HWND parent = GetAncestor( hwnd, GA_PARENT ); XSetWindowAttributes attrib; struct gl_drawable *gl, *prev; - int format; - - if (!(format = pixelformat_from_fbconfig_id( fbconfig_id ))) return FALSE; gl = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*gl) ); - gl->format = &pixel_formats[format - 1]; - gl->visual = pglXGetVisualFromFBConfig( gdi_display, gl->format->fbconfig ); + gl->format = format; + gl->visual = pglXGetVisualFromFBConfig( gdi_display, format->fbconfig ); if (!gl->visual) { HeapFree( GetProcessHeap(), 0, gl ); @@ -1289,7 +1272,7 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) return FALSE; } - TRACE("Created GL drawable 0x%lx, using FBConfigID 0x%lx\n", gl->drawable, fbconfig_id); + TRACE("created GL drawable %lx for win %p format %x\n", gl->drawable, hwnd, format->fmt_id ); XFlush( gdi_display ); @@ -1298,11 +1281,6 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) free_gl_drawable( prev ); XSaveContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char *)gl ); LeaveCriticalSection( &context_section ); - - /* force DCE invalidation */ - SetWindowPos( hwnd, 0, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | - SWP_NOREDRAW | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_STATECHANGED); return TRUE; } @@ -1577,12 +1555,6 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM return prev == iPixelFormat; /* cannot change it if already set */ } - if(!SendMessageW(hwnd, WM_X11DRV_SET_WIN_FORMAT, fmt->fmt_id, 0)) { - ERR("Couldn't set format of the window, returning failure\n"); - return FALSE; - } - /* physDev->current_pf will be set by the DCE update */ - if (TRACE_ON(wgl)) { int gl_test = 0; @@ -1598,7 +1570,8 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM TRACE(" - DRAWABLE_TYPE 0x%x\n", value); } } - return TRUE; + + return set_win_format( hwnd, fmt ); } /*********************************************************************** @@ -2879,8 +2852,7 @@ static BOOL X11DRV_wglSetPixelFormatWINE(HDC hdc, int format) return FALSE; } - return SendMessageW(hwnd, WM_X11DRV_SET_WIN_FORMAT, fmt->fmt_id, 0); - /* DC pixel format will be set by the DCE update */ + return set_win_format( hwnd, fmt ); } /** @@ -3102,11 +3074,6 @@ struct opengl_funcs *get_glx_driver( UINT version ) return NULL; } -BOOL set_win_format( HWND hwnd, XID fbconfig_id ) -{ - return FALSE; -} - BOOL has_gl_drawable( HWND hwnd ) { return FALSE; diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ea9adae..5d7e315 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2430,8 +2430,6 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) { case WM_X11DRV_ACQUIRE_SELECTION: return X11DRV_AcquireClipboard( hwnd ); - case WM_X11DRV_SET_WIN_FORMAT: - return set_win_format( hwnd, (XID)wp ); case WM_X11DRV_SET_WIN_REGION: if ((data = get_win_data( hwnd ))) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index a13d25c..8e114a2 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -517,7 +517,6 @@ extern DWORD EVENT_x11_time_to_win32_time(Time time) DECLSPEC_HIDDEN; enum x11drv_window_messages { WM_X11DRV_ACQUIRE_SELECTION = 0x80001000, - WM_X11DRV_SET_WIN_FORMAT, WM_X11DRV_SET_WIN_REGION, WM_X11DRV_RESIZE_DESKTOP, WM_X11DRV_SET_CURSOR, @@ -568,7 +567,6 @@ extern void release_win_data( struct x11drv_win_data *data ) DECLSPEC_HIDDEN; 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;
1
0
0
0
Alexandre Julliard : winex11: Get rid of the OpenGL GDI driver.
by Alexandre Julliard
03 Oct '12
03 Oct '12
Module: wine Branch: master Commit: 28721d69f46191e92751a619c9f39d8309f0f6bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28721d69f46191e92751a619c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 2 22:05:57 2012 +0200 winex11: Get rid of the OpenGL GDI driver. --- dlls/winex11.drv/init.c | 21 ++++- dlls/winex11.drv/opengl.c | 216 ++------------------------------------------- dlls/winex11.drv/x11drv.h | 2 +- 3 files changed, 26 insertions(+), 213 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=28721d69f46191e92751a…
1
0
0
0
Alexandre Julliard : winex11: Move the FLUSH_GL_DRAWABLE implementation to the main ExtEscape routine.
by Alexandre Julliard
03 Oct '12
03 Oct '12
Module: wine Branch: master Commit: 05fe1e4e35de8864839310813fa4267cdf78ba84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05fe1e4e35de8864839310813…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 2 21:56:43 2012 +0200 winex11: Move the FLUSH_GL_DRAWABLE implementation to the main ExtEscape routine. --- dlls/winex11.drv/init.c | 18 ++++++++++ dlls/winex11.drv/opengl.c | 82 +-------------------------------------------- 2 files changed, 19 insertions(+), 81 deletions(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index d6b45d8..12cff17 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -351,6 +351,24 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d return TRUE; } break; + case X11DRV_FLUSH_GL_DRAWABLE: + if (in_count >= sizeof(struct x11drv_escape_flush_gl_drawable)) + { + const struct x11drv_escape_flush_gl_drawable *data = in_data; + RECT rect = physDev->dc_rect; + + OffsetRect( &rect, -physDev->dc_rect.left, -physDev->dc_rect.top ); + /* The GL drawable may be lagged behind if we don't flush first, so + * flush the display make sure we copy up-to-date data */ + XFlush( gdi_display ); + XSetFunction( gdi_display, physDev->gc, GXcopy ); + XCopyArea( gdi_display, data->gl_drawable, physDev->drawable, physDev->gc, + 0, 0, rect.right, rect.bottom, + physDev->dc_rect.left, physDev->dc_rect.top ); + add_device_bounds( physDev, &rect ); + return TRUE; + } + break; case X11DRV_START_EXPOSURES: XSetGraphicsExposures( gdi_display, physDev->gc, True ); physDev->exposures = 0; diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index d8a3322..4b6cb1f 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1816,25 +1816,6 @@ static BOOL glxdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de return FALSE; } -static void flush_gl_drawable( struct glx_physdev *physdev, Drawable src ) -{ - RECT rect; - int w = physdev->x11dev->dc_rect.right - physdev->x11dev->dc_rect.left; - int h = physdev->x11dev->dc_rect.bottom - physdev->x11dev->dc_rect.top; - - if (w <= 0 || h <= 0) return; - - /* The GL drawable may be lagged behind if we don't flush first, so - * flush the display make sure we copy up-to-date data */ - XFlush(gdi_display); - XSetFunction(gdi_display, physdev->x11dev->gc, GXcopy); - XCopyArea(gdi_display, src, physdev->x11dev->drawable, physdev->x11dev->gc, 0, 0, w, h, - physdev->x11dev->dc_rect.left, physdev->x11dev->dc_rect.top); - SetRect( &rect, 0, 0, w, h ); - add_device_bounds( physdev->x11dev, &rect ); -} - - static void wglFinish(void) { struct x11drv_escape_flush_gl_drawable escape; @@ -3143,67 +3124,6 @@ static BOOL glxdrv_DeleteDC( PHYSDEV dev ) } /********************************************************************** - * glxdrv_ExtEscape - */ -static INT glxdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_data, - INT out_count, LPVOID out_data ) -{ - struct glx_physdev *physdev = get_glxdrv_dev( dev ); - - dev = GET_NEXT_PHYSDEV( dev, pExtEscape ); - - if (escape == X11DRV_ESCAPE && in_data && in_count >= sizeof(enum x11drv_escape_codes)) - { - switch (*(const enum x11drv_escape_codes *)in_data) - { - case X11DRV_SET_DRAWABLE: - if (in_count >= sizeof(struct x11drv_escape_set_drawable)) - { - struct gl_drawable *gl; - const struct x11drv_escape_set_drawable *data = in_data; - - if ((gl = get_gl_drawable( data->hwnd, dev->hdc ))) - { - physdev->format = gl->format; - physdev->type = gl->type; - physdev->drawable = gl->drawable; - physdev->pixmap = gl->pixmap; - release_gl_drawable( gl ); - } - else - { - physdev->format = NULL; - physdev->type = DC_GL_NONE; - physdev->drawable = 0; - physdev->pixmap = 0; - } - TRACE( "SET_DRAWABLE hdc %p drawable %lx pf %p type %u\n", - dev->hdc, physdev->drawable, physdev->format, physdev->type ); - } - break; - case X11DRV_GET_DRAWABLE: - if (out_count >= sizeof(struct x11drv_escape_get_drawable)) - { - struct x11drv_escape_get_drawable *data = out_data; - data->pixel_format = physdev->format ? physdev->format - pixel_formats + 1 : 0; - data->gl_drawable = physdev->drawable; - } - break; - case X11DRV_FLUSH_GL_DRAWABLE: - if (in_count >= sizeof(struct x11drv_escape_flush_gl_drawable)) - { - const struct x11drv_escape_flush_gl_drawable *data = in_data; - flush_gl_drawable( physdev, data->gl_drawable ); - } - return TRUE; - default: - break; - } - } - return dev->funcs->pExtEscape( dev, escape, in_count, in_data, out_count, out_data ); -} - -/********************************************************************** * glxdrv_wine_get_wgl_driver */ static struct opengl_funcs * glxdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version ) @@ -3245,7 +3165,7 @@ static const struct gdi_dc_funcs glxdrv_funcs = NULL, /* pEnumICMProfiles */ NULL, /* pExcludeClipRect */ NULL, /* pExtDeviceMode */ - glxdrv_ExtEscape, /* pExtEscape */ + NULL, /* pExtEscape */ NULL, /* pExtFloodFill */ NULL, /* pExtSelectClipRgn */ NULL, /* pExtTextOut */
1
0
0
0
Alexandre Julliard : winex11: Pass the source drawable to the FLUSH_GL_DRAWABLE escape.
by Alexandre Julliard
03 Oct '12
03 Oct '12
Module: wine Branch: master Commit: d8de77f01e8894a0af422f9f926e5ca683403dd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8de77f01e8894a0af422f9f9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 2 21:50:54 2012 +0200 winex11: Pass the source drawable to the FLUSH_GL_DRAWABLE escape. --- dlls/winex11.drv/opengl.c | 91 +++++++++++++++++++++++++++++--------------- dlls/winex11.drv/x11drv.h | 6 +++ 2 files changed, 66 insertions(+), 31 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 96954cc..d8a3322 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1107,7 +1107,6 @@ static void mark_drawable_dirty(Drawable old, Drawable new) /* Given the current context, make sure its drawable is sync'd */ static inline void sync_context(struct wgl_context *context) { - EnterCriticalSection( &context_section ); if (context->refresh_drawables) { if (glxRequireVersion(3)) pglXMakeContextCurrent(gdi_display, context->drawables[0], @@ -1116,7 +1115,6 @@ static inline void sync_context(struct wgl_context *context) pglXMakeCurrent(gdi_display, context->drawables[0], context->ctx); context->refresh_drawables = FALSE; } - LeaveCriticalSection( &context_section ); } static struct gl_drawable *get_gl_drawable( HWND hwnd, HDC hdc ) @@ -1818,53 +1816,73 @@ static BOOL glxdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de return FALSE; } -static void flush_gl_drawable( struct glx_physdev *physdev ) +static void flush_gl_drawable( struct glx_physdev *physdev, Drawable src ) { RECT rect; int w = physdev->x11dev->dc_rect.right - physdev->x11dev->dc_rect.left; int h = physdev->x11dev->dc_rect.bottom - physdev->x11dev->dc_rect.top; - Drawable src = physdev->drawable; if (w <= 0 || h <= 0) return; - switch (physdev->type) - { - case DC_GL_PIXMAP_WIN: - src = physdev->pixmap; - /* fall through */ - case DC_GL_CHILD_WIN: - /* The GL drawable may be lagged behind if we don't flush first, so - * flush the display make sure we copy up-to-date data */ - XFlush(gdi_display); - XSetFunction(gdi_display, physdev->x11dev->gc, GXcopy); - XCopyArea(gdi_display, src, physdev->x11dev->drawable, physdev->x11dev->gc, 0, 0, w, h, - physdev->x11dev->dc_rect.left, physdev->x11dev->dc_rect.top); - SetRect( &rect, 0, 0, w, h ); - add_device_bounds( physdev->x11dev, &rect ); - default: - break; - } + /* The GL drawable may be lagged behind if we don't flush first, so + * flush the display make sure we copy up-to-date data */ + XFlush(gdi_display); + XSetFunction(gdi_display, physdev->x11dev->gc, GXcopy); + XCopyArea(gdi_display, src, physdev->x11dev->drawable, physdev->x11dev->gc, 0, 0, w, h, + physdev->x11dev->dc_rect.left, physdev->x11dev->dc_rect.top); + SetRect( &rect, 0, 0, w, h ); + add_device_bounds( physdev->x11dev, &rect ); } static void wglFinish(void) { + struct x11drv_escape_flush_gl_drawable escape; + struct gl_drawable *gl; struct wgl_context *ctx = NtCurrentTeb()->glContext; - enum x11drv_escape_codes code = X11DRV_FLUSH_GL_DRAWABLE; - sync_context(ctx); + escape.code = X11DRV_FLUSH_GL_DRAWABLE; + escape.gl_drawable = 0; + + if ((gl = get_gl_drawable( WindowFromDC( ctx->hdc ), 0 ))) + { + switch (gl->type) + { + case DC_GL_PIXMAP_WIN: escape.gl_drawable = gl->pixmap; break; + case DC_GL_CHILD_WIN: escape.gl_drawable = gl->drawable; break; + default: break; + } + sync_context(ctx); + release_gl_drawable( gl ); + } + pglFinish(); - ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL ); + if (escape.gl_drawable) ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); } static void wglFlush(void) { + struct x11drv_escape_flush_gl_drawable escape; + struct gl_drawable *gl; struct wgl_context *ctx = NtCurrentTeb()->glContext; - enum x11drv_escape_codes code = X11DRV_FLUSH_GL_DRAWABLE; - sync_context(ctx); + escape.code = X11DRV_FLUSH_GL_DRAWABLE; + escape.gl_drawable = 0; + + if ((gl = get_gl_drawable( WindowFromDC( ctx->hdc ), 0 ))) + { + switch (gl->type) + { + case DC_GL_PIXMAP_WIN: escape.gl_drawable = gl->pixmap; break; + case DC_GL_CHILD_WIN: escape.gl_drawable = gl->drawable; break; + default: break; + } + sync_context(ctx); + release_gl_drawable( gl ); + } + pglFlush(); - ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL ); + if (escape.gl_drawable) ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); } /*********************************************************************** @@ -3034,12 +3052,15 @@ static void X11DRV_WineGL_LoadExtensions(void) */ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) { - enum x11drv_escape_codes code = X11DRV_FLUSH_GL_DRAWABLE; + struct x11drv_escape_flush_gl_drawable escape; struct gl_drawable *gl; struct wgl_context *ctx = NtCurrentTeb()->glContext; TRACE("(%p)\n", hdc); + escape.code = X11DRV_FLUSH_GL_DRAWABLE; + escape.gl_drawable = 0; + if (!(gl = get_gl_drawable( WindowFromDC( hdc ), hdc ))) { SetLastError( ERROR_INVALID_HANDLE ); @@ -3050,6 +3071,7 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) { case DC_GL_PIXMAP_WIN: if (ctx) sync_context( ctx ); + escape.gl_drawable = gl->pixmap; if (pglXCopySubBufferMESA) { /* (glX)SwapBuffers has an implicit glFlush effect, however * GLX_MESA_copy_sub_buffer doesn't. Make sure GL is flushed before @@ -3059,6 +3081,10 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) gl->rect.right - gl->rect.left, gl->rect.bottom - gl->rect.top ); break; } + pglXSwapBuffers(gdi_display, gl->drawable); + break; + case DC_GL_CHILD_WIN: + escape.gl_drawable = gl->drawable; /* fall through */ default: pglXSwapBuffers(gdi_display, gl->drawable); @@ -3067,8 +3093,7 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) release_gl_drawable( gl ); - ExtEscape( hdc, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL ); - + if (escape.gl_drawable) ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); return TRUE; } @@ -3165,7 +3190,11 @@ static INT glxdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d } break; case X11DRV_FLUSH_GL_DRAWABLE: - flush_gl_drawable( physdev ); + if (in_count >= sizeof(struct x11drv_escape_flush_gl_drawable)) + { + const struct x11drv_escape_flush_gl_drawable *data = in_data; + flush_gl_drawable( physdev, data->gl_drawable ); + } return TRUE; default: break; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 7d6ee68..1f286da 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -291,6 +291,12 @@ struct x11drv_escape_get_drawable int pixel_format; /* internal GL pixel format */ }; +struct x11drv_escape_flush_gl_drawable +{ + enum x11drv_escape_codes code; /* escape code (X11DRV_FLUSH_GL_DRAWABLE) */ + Drawable gl_drawable; /* GL drawable */ +}; + /************************************************************************** * X11 USER driver */
1
0
0
0
Alistair Leslie-Hughes : scrrun: Correct Invoke parameter.
by Alexandre Julliard
02 Oct '12
02 Oct '12
Module: wine Branch: master Commit: ea151639737f08ca76bcec0ae174296cacdc572c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ea151639737f08ca76bcec0ae…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Sep 21 10:53:51 2012 +1000 scrrun: Correct Invoke parameter. --- dlls/scrrun/dictionary.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c index 7664af8..b75d23c 100644 --- a/dlls/scrrun/dictionary.c +++ b/dlls/scrrun/dictionary.c @@ -153,7 +153,7 @@ static HRESULT WINAPI dictionary_Invoke(IDictionary *iface, DISPID dispIdMember, hr = get_typeinfo(IDictionary_tid, &typeinfo); if(SUCCEEDED(hr)) { - hr = ITypeInfo_Invoke(typeinfo, &iface, dispIdMember, wFlags, + hr = ITypeInfo_Invoke(typeinfo, &This->IDictionary_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); ITypeInfo_Release(typeinfo); }
1
0
0
0
Alexandre Julliard : ntoskrnl.exe: Add missing WINAPIs.
by Alexandre Julliard
02 Oct '12
02 Oct '12
Module: wine Branch: master Commit: b560c56f3f33d0048fc069a5b1938c2f2b0c7236 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b560c56f3f33d0048fc069a5b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 2 18:37:28 2012 +0200 ntoskrnl.exe: Add missing WINAPIs. --- dlls/ntoskrnl.exe/ntoskrnl.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index a127551..632cea5 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1493,8 +1493,8 @@ PVOID WINAPI MmMapIoSpace( PHYSICAL_ADDRESS PhysicalAddress, DWORD NumberOfBytes /*********************************************************************** * MmMapLockedPagesSpecifyCache (NTOSKRNL.EXE.@) */ -PVOID MmMapLockedPagesSpecifyCache(PMDLX MemoryDescriptorList, KPROCESSOR_MODE AccessMode, MEMORY_CACHING_TYPE CacheType, - PVOID BaseAddress, ULONG BugCheckOnFailure, MM_PAGE_PRIORITY Priority) +PVOID WINAPI MmMapLockedPagesSpecifyCache(PMDLX MemoryDescriptorList, KPROCESSOR_MODE AccessMode, MEMORY_CACHING_TYPE CacheType, + PVOID BaseAddress, ULONG BugCheckOnFailure, MM_PAGE_PRIORITY Priority) { FIXME("(%p, %u, %u, %p, %u, %u): stub\n", MemoryDescriptorList, AccessMode, CacheType, BaseAddress, BugCheckOnFailure, Priority); @@ -1515,7 +1515,7 @@ PVOID WINAPI MmPageEntireDriver(PVOID AddrInSection) /*********************************************************************** * MmProbeAndLockPages (NTOSKRNL.EXE.@) */ -void MmProbeAndLockPages(PMDLX MemoryDescriptorList, KPROCESSOR_MODE AccessMode, LOCK_OPERATION Operation) +void WINAPI MmProbeAndLockPages(PMDLX MemoryDescriptorList, KPROCESSOR_MODE AccessMode, LOCK_OPERATION Operation) { FIXME("(%p, %u, %u): stub\n", MemoryDescriptorList, AccessMode, Operation); } @@ -1533,7 +1533,7 @@ void WINAPI MmResetDriverPaging(PVOID AddrInSection) /*********************************************************************** * MmUnlockPages (NTOSKRNL.EXE.@) */ -void MmUnlockPages(PMDLX MemoryDescriptorList) +void WINAPI MmUnlockPages(PMDLX MemoryDescriptorList) { FIXME("(%p): stub\n", MemoryDescriptorList); }
1
0
0
0
Alexandre Julliard : user32: Don' t redraw anything when WS_VISIBLE is toggled manually.
by Alexandre Julliard
02 Oct '12
02 Oct '12
Module: wine Branch: master Commit: b30e84d58012a9a1ead70a8e32739765c31f2468 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b30e84d58012a9a1ead70a8e3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 2 19:52:31 2012 +0200 user32: Don't redraw anything when WS_VISIBLE is toggled manually. --- dlls/user32/win.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 023af02..0f487f7 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -769,7 +769,7 @@ ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) RECT window_rect, client_rect; WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect ); set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | - SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW, + SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_SHOWWINDOW, &window_rect, &client_rect, NULL ); } @@ -2492,7 +2492,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B RECT window_rect, client_rect; WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect ); set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | - SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW, + SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_SHOWWINDOW, &window_rect, &client_rect, NULL ); } SendMessageW( hwnd, WM_STYLECHANGED, offset, (LPARAM)&style );
1
0
0
0
Alexandre Julliard : winex11: Refuse to set the pixel format for HWND_MESSAGE windows.
by Alexandre Julliard
02 Oct '12
02 Oct '12
Module: wine Branch: master Commit: 53806917a3fc32460201a40a9edd6d8d24983c25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53806917a3fc32460201a40a9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 2 18:14:15 2012 +0200 winex11: Refuse to set the pixel format for HWND_MESSAGE windows. --- dlls/winex11.drv/opengl.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 6945bd1..96954cc 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1196,6 +1196,7 @@ static void free_gl_drawable( struct gl_drawable *gl ) */ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) { + HWND parent = GetAncestor( hwnd, GA_PARENT ); XSetWindowAttributes attrib; struct gl_drawable *gl, *prev; int format; @@ -1215,9 +1216,9 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) gl->rect.right = min( max( 1, gl->rect.right ), 65535 ); gl->rect.bottom = min( max( 1, gl->rect.bottom ), 65535 ); - if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) /* top-level window */ + if (parent == GetDesktopWindow()) /* top-level window */ { - Window parent = X11DRV_get_whole_window( hwnd ); + Window xparent = X11DRV_get_whole_window( hwnd ); gl->type = DC_GL_WINDOW; gl->colormap = XCreateColormap( gdi_display, root_window, gl->visual->visual, @@ -1230,8 +1231,8 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) attrib.backing_store = NotUseful; /* put the initial rect outside of the window, it will be moved into place by SetWindowPos */ OffsetRect( &gl->rect, gl->rect.right, gl->rect.bottom ); - if (parent) - gl->drawable = XCreateWindow( gdi_display, parent, gl->rect.left, gl->rect.top, + if (xparent) + gl->drawable = XCreateWindow( gdi_display, xparent, gl->rect.left, gl->rect.top, gl->rect.right - gl->rect.left, gl->rect.bottom - gl->rect.top, 0, default_visual.depth, InputOutput, gl->visual->visual, CWBitGravity | CWWinGravity | CWBackingStore | CWColormap, @@ -1241,6 +1242,10 @@ BOOL set_win_format( HWND hwnd, XID fbconfig_id ) else XFreeColormap( gdi_display, gl->colormap ); } + else if (!GetAncestor( parent, GA_PARENT )) + { + FIXME( "can't set format of HWND_MESSAGE window %p\n", hwnd ); + } #ifdef SONAME_LIBXCOMPOSITE else if(usexcomposite) {
1
0
0
0
Jacek Caban : mshtml: Added script 'for' and 'event' attributes tests.
by Alexandre Julliard
02 Oct '12
02 Oct '12
Module: wine Branch: master Commit: 43a178fad130a8623fa33af7699bf7ad5129829c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43a178fad130a8623fa33af76…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 2 15:47:06 2012 +0200 mshtml: Added script 'for' and 'event' attributes tests. --- dlls/mshtml/tests/events.html | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/tests/events.html b/dlls/mshtml/tests/events.html index ad9db3f..b3b6958 100644 --- a/dlls/mshtml/tests/events.html +++ b/dlls/mshtml/tests/events.html @@ -1,6 +1,8 @@ <html> <head> <script> +var testevent_divid2_called = false, cnt=0; + function ok(b,m) { return external.ok(b, m); } @@ -64,8 +66,23 @@ function ondataavailable_test() { ok(evobj.type === "dataavailable", "evobj.type = " + evobj.type); } +function test_scriptfor() { + var div = document.getElementById("divid2"); + ok("onclick" in div, "testevent not in div"); + ok(typeof(div.onclick) === "function", "typeof(div.onclick) = " + typeof(div.onclick)); + ok(testevent_divid2_called === false, "testevent_divid2_called = " + testevent_divid2_called); + div.click(); + ok(testevent_divid2_called === true, "testevent_divid2_called = " + testevent_divid2_called); + + ok(!("ontest" in div), "testevent in div"); + ok(typeof(div.ontest) === "undefined", "typeof(div.ontest) = " + typeof(div.ontest)); +} + function runTests() { try { + ok(cnt == 1, "cnt=" + cnt + " exception during loading?"); + + test_scriptfor(); ondataavailable_test(); }catch(e) { ok(false, "Got an exception: " + e.message); @@ -77,5 +94,19 @@ function runTests() { </head> <body onload="runTests()"> <div id="divid"></div> +<div id="divid2"></div> +<script event="onclick" for="divid2"> + testevent_divid2_called = true; +</script> +<script event="ontest" for="divid2"> + ok(false, "unexpected ontest"); +</script> +<script> +(function() { + var div = document.getElementById("divid2"); + ok(div.onclick === null, "div.onclick = null"); + cnt++; +})(); +</script> </body> </html>
1
0
0
0
Jacek Caban : mshtml: Added support for script 'for' and 'event' attributes .
by Alexandre Julliard
02 Oct '12
02 Oct '12
Module: wine Branch: master Commit: d40b1ae8dc7285eabedf9bafadd90137231be0a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d40b1ae8dc7285eabedf9bafa…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 2 15:46:20 2012 +0200 mshtml: Added support for script 'for' and 'event' attributes. --- dlls/mshtml/htmldoc3.c | 2 +- dlls/mshtml/htmlevent.c | 15 +++ dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/mutation.c | 1 + dlls/mshtml/script.c | 212 ++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 225 insertions(+), 8 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d40b1ae8dc7285eabedf9…
1
0
0
0
← Newer
1
...
84
85
86
87
88
89
90
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200