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
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
April 2011
----- 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
3 participants
937 discussions
Start a n
N
ew thread
Stefan Dösinger : d3d: Map D3DRS_ZBIAS to WINED3DRS_DEPTHBIAS.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 96b758f7b37033bf382ce40dd3310965d3ac3f76 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=96b758f7b37033bf382ce40dd…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Apr 21 22:36:11 2011 +0200 d3d: Map D3DRS_ZBIAS to WINED3DRS_DEPTHBIAS. ZBIAS was removed in d3d9 and replaced with DEPTHBIAS. Currently wined3d implements both independently which will cause trouble if we want to set the depthbias value depending on the depth stencil format. --- dlls/d3d8/device.c | 32 ++++++++++++++++++++++++++++++-- dlls/ddraw/device.c | 28 ++++++++++++++++++++++++++++ dlls/wined3d/state.c | 32 +------------------------------- dlls/wined3d/stateblock.c | 1 - dlls/wined3d/utils.c | 1 - include/wine/wined3d.idl | 1 - 6 files changed, 59 insertions(+), 36 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 976e71f..47a727d 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1373,11 +1373,25 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(IDirect3DDevice8 *ifac { IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; + union + { + DWORD d; + float f; + } wined3d_value; TRACE("iface %p, state %#x, value %#x.\n", iface, State, Value); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, State, Value); + switch (State) + { + case D3DRS_ZBIAS: + wined3d_value.f = Value / -16.0f; + hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, WINED3DRS_DEPTHBIAS, wined3d_value.d); + break; + + default: + hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, State, Value); + } wined3d_mutex_unlock(); return hr; @@ -1388,11 +1402,25 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(IDirect3DDevice8 *ifac { IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; + union + { + DWORD d; + float f; + } wined3d_value; TRACE("iface %p, state %#x, value %p.\n", iface, State, pValue); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, State, pValue); + switch (State) + { + case D3DRS_ZBIAS: + hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, WINED3DRS_DEPTHBIAS, &wined3d_value.d); + if (SUCCEEDED(hr)) *pValue = -wined3d_value.f * 16.0f; + break; + + default: + hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, State, pValue); + } wined3d_mutex_unlock(); return hr; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index b1b4cf6..1c2b89c 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2374,6 +2374,20 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, hr = DDERR_INVALIDPARAMS; break; + case D3DRENDERSTATE_ZBIAS: + { + union + { + DWORD d; + float f; + } wined3d_value; + + hr = IWineD3DDevice_GetRenderState(This->wineD3DDevice, + WINED3DRS_DEPTHBIAS, + &wined3d_value.d); + if (SUCCEEDED(hr)) *Value = -wined3d_value.f * 16.0f; + } + default: if (RenderStateType >= D3DRENDERSTATE_STIPPLEPATTERN00 && RenderStateType <= D3DRENDERSTATE_STIPPLEPATTERN31) @@ -2688,6 +2702,20 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, hr = DDERR_INVALIDPARAMS; break; + case D3DRENDERSTATE_ZBIAS: + { + union + { + DWORD d; + float f; + } wined3d_value; + wined3d_value.f = Value / -16.0; + hr = IWineD3DDevice_SetRenderState(This->wineD3DDevice, + WINED3DRS_DEPTHBIAS, + wined3d_value.d); + break; + } + default: if (RenderStateType >= D3DRENDERSTATE_STIPPLEPATTERN00 && RenderStateType <= D3DRENDERSTATE_STIPPLEPATTERN31) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 9d54076..88ccd1b 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1383,36 +1383,6 @@ static void state_linepattern(DWORD state, struct wined3d_stateblock *stateblock } } -static void state_zbias(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) -{ - union { - DWORD d; - float f; - } tmpvalue; - - if (stateblock->state.render_states[WINED3DRS_ZBIAS]) - { - tmpvalue.d = stateblock->state.render_states[WINED3DRS_ZBIAS]; - TRACE("ZBias value %f\n", tmpvalue.f); - glPolygonOffset(0, -tmpvalue.f); - checkGLcall("glPolygonOffset(0, -Value)"); - glEnable(GL_POLYGON_OFFSET_FILL); - checkGLcall("glEnable(GL_POLYGON_OFFSET_FILL);"); - glEnable(GL_POLYGON_OFFSET_LINE); - checkGLcall("glEnable(GL_POLYGON_OFFSET_LINE);"); - glEnable(GL_POLYGON_OFFSET_POINT); - checkGLcall("glEnable(GL_POLYGON_OFFSET_POINT);"); - } else { - glDisable(GL_POLYGON_OFFSET_FILL); - checkGLcall("glDisable(GL_POLYGON_OFFSET_FILL);"); - glDisable(GL_POLYGON_OFFSET_LINE); - checkGLcall("glDisable(GL_POLYGON_OFFSET_LINE);"); - glDisable(GL_POLYGON_OFFSET_POINT); - checkGLcall("glDisable(GL_POLYGON_OFFSET_POINT);"); - } -} - - static void state_normalize(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if(isStateDirty(context, STATE_VDECL)) { @@ -5061,7 +5031,6 @@ const struct StateEntryTemplate misc_state_template[] = { { STATE_RENDER(WINED3DRS_SUBPIXEL), { STATE_RENDER(WINED3DRS_SUBPIXEL), state_subpixel }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_SUBPIXELX), { STATE_RENDER(WINED3DRS_SUBPIXELX), state_subpixelx }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_STIPPLEDALPHA), { STATE_RENDER(WINED3DRS_STIPPLEDALPHA), state_stippledalpha }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3DRS_ZBIAS), { STATE_RENDER(WINED3DRS_ZBIAS), state_zbias }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_STIPPLEENABLE), { STATE_RENDER(WINED3DRS_STIPPLEENABLE), state_stippleenable }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_MIPMAPLODBIAS), { STATE_RENDER(WINED3DRS_MIPMAPLODBIAS), state_mipmaplodbias }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_ANISOTROPY), { STATE_RENDER(WINED3DRS_ANISOTROPY), state_anisotropy }, WINED3D_GL_EXT_NONE }, @@ -5793,6 +5762,7 @@ static void validate_state_table(struct StateEntry *state_table) { 17, 18}, { 21, 21}, { 42, 45}, + { 47, 47}, { 61, 127}, {149, 150}, {169, 169}, diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 79fbb2e..b1b823a 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1141,7 +1141,6 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) tmpfloat.f = 1.0f; state->render_states[WINED3DRS_FOGDENSITY] = tmpfloat.d; state->render_states[WINED3DRS_EDGEANTIALIAS] = FALSE; - state->render_states[WINED3DRS_ZBIAS] = 0; state->render_states[WINED3DRS_RANGEFOGENABLE] = FALSE; state->render_states[WINED3DRS_STENCILENABLE] = FALSE; state->render_states[WINED3DRS_STENCILFAIL] = WINED3DSTENCILOP_KEEP; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 00ef23a..096b483 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1962,7 +1962,6 @@ const char *debug_d3drenderstate(WINED3DRENDERSTATETYPE state) D3DSTATE_TO_STR(WINED3DRS_EDGEANTIALIAS); D3DSTATE_TO_STR(WINED3DRS_COLORKEYENABLE); D3DSTATE_TO_STR(WINED3DRS_MIPMAPLODBIAS); - D3DSTATE_TO_STR(WINED3DRS_ZBIAS); D3DSTATE_TO_STR(WINED3DRS_RANGEFOGENABLE); D3DSTATE_TO_STR(WINED3DRS_ANISOTROPY); D3DSTATE_TO_STR(WINED3DRS_FLUSHBATCH); diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index d536004..2406540 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -319,7 +319,6 @@ typedef enum _WINED3DRENDERSTATETYPE WINED3DRS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */ WINED3DRS_COLORKEYENABLE = 41, /* d3d7 */ WINED3DRS_MIPMAPLODBIAS = 46, /* d3d7 */ - WINED3DRS_ZBIAS = 47, /* d3d7, d3d8 */ WINED3DRS_RANGEFOGENABLE = 48, WINED3DRS_ANISOTROPY = 49, /* d3d7 */ WINED3DRS_FLUSHBATCH = 50, /* d3d7 */
1
0
0
0
Alexandre Julliard : server: Set the fd user when duplicating a mapping file descriptor into a new file .
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: f2b34dddfb0ff4d390c9d576570c94467d8cc447 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2b34dddfb0ff4d390c9d5765…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 22 17:07:45 2011 +0200 server: Set the fd user when duplicating a mapping file descriptor into a new file. --- server/file.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/server/file.c b/server/file.c index fe88495..fcfd572 100644 --- a/server/file.c +++ b/server/file.c @@ -162,6 +162,7 @@ struct file *create_file_for_fd_obj( struct fd *fd, unsigned int access, unsigne release_object( file ); return NULL; } + set_fd_user( file->fd, &file_fd_ops, &file->obj ); } return file; }
1
0
0
0
Alexandre Julliard : winex11: Allow changing the clipping rectangle while the mouse is grabbed.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 33c491eb84cf6907943d39b8a444ebfc1b642e99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33c491eb84cf6907943d39b8a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 22 16:58:20 2011 +0200 winex11: Allow changing the clipping rectangle while the mouse is grabbed. --- dlls/winex11.drv/mouse.c | 29 +++++++++++++++++++---------- dlls/winex11.drv/x11drv.h | 1 + 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 1b3c15f..b447b7e 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -376,6 +376,8 @@ static HWND create_clipping_msg_window(void) */ LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ) { + struct x11drv_thread_data *data = x11drv_thread_data(); + if (hwnd == GetDesktopWindow()) /* change the clip window stored in the desktop process */ { static HWND clip_hwnd; @@ -385,8 +387,9 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ) if (prev || new_clip_hwnd) TRACE( "clip hwnd changed from %p to %p\n", prev, new_clip_hwnd ); if (prev) SendNotifyMessageW( prev, WM_X11DRV_CLIP_CURSOR, 0, 0 ); } - else /* this is a notification that clipping has been reset */ + else if (hwnd == data->clip_hwnd) /* this is a notification that clipping has been reset */ { + data->clip_hwnd = 0; disable_xinput2(); DestroyWindow( hwnd ); } @@ -402,19 +405,21 @@ static BOOL grab_clipping_window( const RECT *clip ) { struct x11drv_thread_data *data = x11drv_init_thread_data(); Window clip_window = init_clip_window(); - HWND msg_hwnd; + HWND msg_hwnd = 0; if (!clip_window) return TRUE; - if (!(msg_hwnd = create_clipping_msg_window())) return TRUE; + /* create a clip message window unless we are already clipping */ + if (!data->clip_hwnd && !(msg_hwnd = create_clipping_msg_window())) return TRUE; TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); + wine_tsx11_lock(); - XUnmapWindow( data->display, clip_window ); + if (msg_hwnd) XUnmapWindow( data->display, clip_window ); XMoveResizeWindow( data->display, clip_window, clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, clip->right - clip->left, clip->bottom - clip->top ); - XMapWindow( data->display, clip_window ); + if (msg_hwnd) XMapWindow( data->display, clip_window ); if (!XGrabPointer( data->display, clip_window, False, PointerMotionMask | ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) @@ -423,13 +428,17 @@ static BOOL grab_clipping_window( const RECT *clip ) if (!clipping_cursor) { - DestroyWindow( msg_hwnd ); + if (msg_hwnd) DestroyWindow( msg_hwnd ); return FALSE; } - enable_xinput2(); - sync_window_cursor( clip_window ); - clip_rect = *clip; - SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd ); + if (msg_hwnd) + { + data->clip_hwnd = msg_hwnd; + enable_xinput2(); + sync_window_cursor( clip_window ); + clip_rect = *clip; + SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd ); + } return TRUE; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 2187d72..48394ac 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -551,6 +551,7 @@ struct x11drv_thread_data XFontSet font_set; /* international text drawing font set */ Window selection_wnd; /* window used for selection interactions */ Window clip_window; /* window used for cursor clipping */ + HWND clip_hwnd; /* message window stored in desktop while clipping is active */ HKL kbd_layout; /* active keyboard layout */ enum { xi_unavailable = -1, xi_unknown, xi_disabled, xi_enabled } xi2_state; /* XInput2 state */ };
1
0
0
0
Alexandre Julliard : winex11: Add separate helper functions for pointer grabbing and ungrabbing.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: a292220e1d3b856a30af84aa8c7a5af4701bb275 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a292220e1d3b856a30af84aa8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 22 16:28:25 2011 +0200 winex11: Add separate helper functions for pointer grabbing and ungrabbing. --- dlls/winex11.drv/mouse.c | 102 ++++++++++++++++++++++++++++------------------ 1 files changed, 62 insertions(+), 40 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 4e622d7..1b3c15f 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -394,6 +394,66 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ) } /*********************************************************************** + * grab_clipping_window + * + * Start a pointer grab on the clip window. + */ +static BOOL grab_clipping_window( const RECT *clip ) +{ + struct x11drv_thread_data *data = x11drv_init_thread_data(); + Window clip_window = init_clip_window(); + HWND msg_hwnd; + + if (!clip_window) return TRUE; + + if (!(msg_hwnd = create_clipping_msg_window())) return TRUE; + + TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); + wine_tsx11_lock(); + XUnmapWindow( data->display, clip_window ); + XMoveResizeWindow( data->display, clip_window, + clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, + clip->right - clip->left, clip->bottom - clip->top ); + XMapWindow( data->display, clip_window ); + if (!XGrabPointer( data->display, clip_window, False, + PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) + clipping_cursor = 1; + wine_tsx11_unlock(); + + if (!clipping_cursor) + { + DestroyWindow( msg_hwnd ); + return FALSE; + } + enable_xinput2(); + sync_window_cursor( clip_window ); + clip_rect = *clip; + SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd ); + return TRUE; +} + +/*********************************************************************** + * ungrab_clipping_window + * + * Release the pointer grab on the clip window. + */ +static void ungrab_clipping_window(void) +{ + Display *display = thread_init_display(); + Window clip_window = init_clip_window(); + + if (!clip_window) return; + + TRACE( "no longer clipping\n" ); + wine_tsx11_lock(); + XUnmapWindow( display, clip_window ); + wine_tsx11_unlock(); + clipping_cursor = 0; + SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, 0 ); +} + +/*********************************************************************** * send_mouse_input * * Update the various window states on a mouse event. @@ -1110,11 +1170,6 @@ BOOL CDECL X11DRV_GetCursorPos(LPPOINT pos) */ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) { - Display *display = thread_init_display(); - Window clip_window = init_clip_window(); - - if (!clip_window) return TRUE; - /* we are clipping if the clip rectangle is smaller than the screen */ if (clip && (clip->left > virtual_screen_rect.left || clip->right < virtual_screen_rect.right || @@ -1124,43 +1179,10 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) return TRUE; /* don't clip in the desktop process */ - if (grab_pointer) - { - HWND msg_hwnd = create_clipping_msg_window(); - - if (!msg_hwnd) return TRUE; - TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); - wine_tsx11_lock(); - XUnmapWindow( display, clip_window ); - XMoveResizeWindow( display, clip_window, - clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, - clip->right - clip->left, clip->bottom - clip->top ); - XMapWindow( display, clip_window ); - if (!XGrabPointer( display, clip_window, False, - PointerMotionMask | ButtonPressMask | ButtonReleaseMask, - GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) - clipping_cursor = 1; - wine_tsx11_unlock(); - - if (clipping_cursor) - { - enable_xinput2(); - sync_window_cursor( clip_window ); - clip_rect = *clip; - SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd ); - return TRUE; - } - DestroyWindow( msg_hwnd ); - } + if (grab_pointer && grab_clipping_window( clip )) return TRUE; } - /* release the grab if any */ - TRACE( "no longer clipping\n" ); - wine_tsx11_lock(); - XUnmapWindow( display, clip_window ); - wine_tsx11_unlock(); - clipping_cursor = 0; - SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, 0 ); + ungrab_clipping_window(); return TRUE; }
1
0
0
0
Alexandre Julliard : winex11: Store a message window with the desktop when the cursor is clipped.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 0eb19126e5c0efe7e5e0cbd4811c19523601973a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0eb19126e5c0efe7e5e0cbd48…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 22 16:22:09 2011 +0200 winex11: Store a message window with the desktop when the cursor is clipped. This ensures that the thread can be notified when the clip rectangle is reset. --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/mouse.c | 53 +++++++++++++++++++++++++++++++++++--------- dlls/winex11.drv/window.c | 2 + dlls/winex11.drv/x11drv.h | 5 ++- 4 files changed, 48 insertions(+), 14 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 75e7d8d..b338236 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -795,7 +795,7 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event ) */ static void X11DRV_UnmapNotify( HWND hwnd, XEvent *event ) { - if (event->xany.window == x11drv_thread_data()->clip_window) clipping_window_unmapped(); + if (event->xany.window == x11drv_thread_data()->clip_window) clipping_cursor = 0; } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 2768d8e..4e622d7 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -348,25 +348,51 @@ static void disable_xinput2(void) } /*********************************************************************** - * clipping_window_unmapped + * create_clipping_msg_window + */ +static HWND create_clipping_msg_window(void) +{ + static const WCHAR class_name[] = {'_','_','x','1','1','d','r','v','_','c','l','i','p','_','c','l','a','s','s',0}; + static ATOM clip_class; + + if (!clip_class) + { + WNDCLASSW class; + ATOM atom; + + memset( &class, 0, sizeof(class) ); + class.lpfnWndProc = DefWindowProcW; + class.hInstance = GetModuleHandleW(0); + class.lpszClassName = class_name; + if ((atom = RegisterClassW( &class ))) clip_class = atom; + } + return CreateWindowW( class_name, NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0, GetModuleHandleW(0), NULL ); +} + +/*********************************************************************** + * clip_cursor_notify * - * Turn off clipping when the window got unmapped. + * Notification function called upon receiving a WM_X11DRV_CLIP_CURSOR. */ -void clipping_window_unmapped(void) +LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ) { - struct x11drv_thread_data *data = x11drv_thread_data(); + if (hwnd == GetDesktopWindow()) /* change the clip window stored in the desktop process */ + { + static HWND clip_hwnd; - clipping_cursor = 0; - if (data->xi2_state == xi_enabled) + HWND prev = clip_hwnd; + clip_hwnd = new_clip_hwnd; + if (prev || new_clip_hwnd) TRACE( "clip hwnd changed from %p to %p\n", prev, new_clip_hwnd ); + if (prev) SendNotifyMessageW( prev, WM_X11DRV_CLIP_CURSOR, 0, 0 ); + } + else /* this is a notification that clipping has been reset */ { - RECT rect; - GetClipCursor( &rect ); - if (EqualRect( &rect, &clip_rect )) return; /* still clipped */ disable_xinput2(); + DestroyWindow( hwnd ); } + return 0; } - /*********************************************************************** * send_mouse_input * @@ -1100,6 +1126,9 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) if (grab_pointer) { + HWND msg_hwnd = create_clipping_msg_window(); + + if (!msg_hwnd) return TRUE; TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); wine_tsx11_lock(); XUnmapWindow( display, clip_window ); @@ -1118,8 +1147,10 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) enable_xinput2(); sync_window_cursor( clip_window ); clip_rect = *clip; + SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd ); return TRUE; } + DestroyWindow( msg_hwnd ); } } @@ -1129,7 +1160,7 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) XUnmapWindow( display, clip_window ); wine_tsx11_unlock(); clipping_cursor = 0; - disable_xinput2(); + SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, 0 ); return TRUE; } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 0a25afb..ba544cd 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2719,6 +2719,8 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) if ((data = X11DRV_get_win_data( hwnd )) && data->whole_window) set_window_cursor( data->whole_window, (HCURSOR)lp ); return 0; + case WM_X11DRV_CLIP_CURSOR: + return clip_cursor_notify( hwnd, (HWND)lp ); default: FIXME( "got window msg %x hwnd %p wp %lx lp %lx\n", msg, hwnd, wp, lp ); return 0; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index cbc563b..2187d72 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -744,7 +744,8 @@ enum x11drv_window_messages WM_X11DRV_SET_WIN_FORMAT, WM_X11DRV_SET_WIN_REGION, WM_X11DRV_RESIZE_DESKTOP, - WM_X11DRV_SET_CURSOR + WM_X11DRV_SET_CURSOR, + WM_X11DRV_CLIP_CURSOR }; /* _NET_WM_STATE properties that we keep track of */ @@ -826,7 +827,7 @@ extern void X11DRV_ResetSelectionOwner(void); extern void CDECL X11DRV_SetFocus( HWND hwnd ); extern void set_window_cursor( Window window, HCURSOR handle ); extern void sync_window_cursor( Window window ); -extern void clipping_window_unmapped(void); +extern LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ); extern BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ); extern void X11DRV_InitKeyboard( Display *display ); extern DWORD CDECL X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
1
0
0
0
Alexandre Julliard : user32: Pass a NULL rectangle in the ClipCursor entry point when clipping is reset because of focus change .
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 8aa1a26886e763ea331d53b349f729d3d0bd1c71 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8aa1a26886e763ea331d53b34…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 22 15:22:07 2011 +0200 user32: Pass a NULL rectangle in the ClipCursor entry point when clipping is reset because of focus change. --- dlls/user32/message.c | 12 +++++++----- server/queue.c | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 51691ab..7661e3e 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -1870,11 +1870,13 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR return call_current_hook( h_extra->handle, HC_ACTION, wparam, h_extra->lparam ); } case WM_WINE_CLIPCURSOR: - { - RECT rect; - GetClipCursor( &rect ); - return USER_Driver->pClipCursor( &rect ); - } + if (wparam) + { + RECT rect; + GetClipCursor( &rect ); + return USER_Driver->pClipCursor( &rect ); + } + return USER_Driver->pClipCursor( NULL ); default: if (msg >= WM_WINE_FIRST_DRIVER_MSG && msg <= WM_WINE_LAST_DRIVER_MSG) return USER_Driver->pWindowMessage( hwnd, msg, wparam, lparam ); diff --git a/server/queue.c b/server/queue.c index 91fe1fc..8bf2336 100644 --- a/server/queue.c +++ b/server/queue.c @@ -354,9 +354,9 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect get_top_window_rectangle( desktop, &top_rect ); if (!rect || !intersect_rect( &new_rect, &top_rect, rect )) new_rect = top_rect; - if (!memcmp( &desktop->cursor.clip, &new_rect, sizeof(new_rect) )) return; desktop->cursor.clip = new_rect; - if (desktop->cursor.clip_msg) post_desktop_message( desktop, desktop->cursor.clip_msg, 0, 0 ); + if (desktop->cursor.clip_msg) + post_desktop_message( desktop, desktop->cursor.clip_msg, rect != NULL, 0 ); /* warp the mouse to be inside the clip rect */ x = min( max( desktop->cursor.x, desktop->cursor.clip.left ), desktop->cursor.clip.right-1 );
1
0
0
0
Alexandre Julliard : winetest: Cowardly refuse to submit results that have too many failed tests.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 9f72d1959fe9b7a3469495c19ee30114488230a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f72d1959fe9b7a3469495c19…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 22 13:20:49 2011 +0200 winetest: Cowardly refuse to submit results that have too many failed tests. --- programs/winetest/main.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 3316b44..376b542 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -40,6 +40,9 @@ /* Don't submit the results if more than SKIP_LIMIT tests have been skipped */ #define SKIP_LIMIT 10 +/* Don't submit the results if more than FAILURES_LIMIT tests have failed */ +#define FAILURES_LIMIT 50 + struct wine_test { char *name; @@ -62,6 +65,7 @@ static const char whitespace[] = " \t\r\n"; static const char testexe[] = "_test.exe"; static char build_id[64]; static BOOL is_wow64; +static int failures; /* filters for running only specific tests */ static char *filters[64]; @@ -705,6 +709,7 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch status = run_ex (cmd, out_file, tempdir, 120000); heap_free (cmd); xprintf ("%s:%s done (%d)\n", test->name, subtest, status); + if (status) failures++; } } @@ -1316,7 +1321,13 @@ int main( int argc, char *argv[] ) DeleteFileA(logname); exit (0); } - if (build_id[0] && nr_of_skips <= SKIP_LIMIT && !nr_native_dlls && !is_win9x && + if (failures > FAILURES_LIMIT) + report( R_WARNING, + "%d tests failed, there's probably something broken with your setup.\n" + "You need to address this before submitting results.", failures ); + + if (build_id[0] && nr_of_skips <= SKIP_LIMIT && failures <= FAILURES_LIMIT && + !nr_native_dlls && !is_win9x && report (R_ASK, MB_YESNO, "Do you want to submit the test results?") == IDYES) if (!send_file (logname) && !DeleteFileA(logname)) report (R_WARNING, "Can't remove logfile: %u", GetLastError());
1
0
0
0
Marcus Meissner : kernel32: Mark more internal symbols as invisible.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 42a294b0d4e4cec3708c059e515174c60f52cb6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42a294b0d4e4cec3708c059e5…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Apr 21 10:23:57 2011 +0200 kernel32: Mark more internal symbols as invisible. --- dlls/kernel32/console_private.h | 22 +++++++++++----------- dlls/kernel32/kernel_private.h | 36 ++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dlls/kernel32/console_private.h b/dlls/kernel32/console_private.h index d4bc996..dc48700 100644 --- a/dlls/kernel32/console_private.h +++ b/dlls/kernel32/console_private.h @@ -22,21 +22,21 @@ #define __WINE_CONSOLE_PRIVATE_H /* console.c */ -extern int CONSOLE_HandleCtrlC(unsigned); +extern int CONSOLE_HandleCtrlC(unsigned) DECLSPEC_HIDDEN; /* console.c */ -extern int CONSOLE_GetHistory(int idx, WCHAR* buf, int buf_len); -extern BOOL CONSOLE_AppendHistory(const WCHAR *p); -extern unsigned CONSOLE_GetNumHistoryEntries(void); -extern void CONSOLE_FillLineUniform(HANDLE hConsoleOutput, int i, int j, int len, LPCHAR_INFO lpFill); -extern BOOL CONSOLE_GetEditionMode(HANDLE, int*); +extern int CONSOLE_GetHistory(int idx, WCHAR* buf, int buf_len) DECLSPEC_HIDDEN; +extern BOOL CONSOLE_AppendHistory(const WCHAR *p) DECLSPEC_HIDDEN; +extern unsigned CONSOLE_GetNumHistoryEntries(void) DECLSPEC_HIDDEN; +extern void CONSOLE_FillLineUniform(HANDLE hConsoleOutput, int i, int j, int len, LPCHAR_INFO lpFill) DECLSPEC_HIDDEN; +extern BOOL CONSOLE_GetEditionMode(HANDLE, int*) DECLSPEC_HIDDEN; /* editline.c */ -extern WCHAR* CONSOLE_Readline(HANDLE, BOOL); +extern WCHAR* CONSOLE_Readline(HANDLE, BOOL) DECLSPEC_HIDDEN; /* term.c */ -extern BOOL TERM_Init(void); -extern BOOL TERM_Exit(void); -extern unsigned TERM_FillSimpleChar(WCHAR real_inchar, INPUT_RECORD* ir); -extern int TERM_FillInputRecord(const char* in, size_t len, INPUT_RECORD* ir); +extern BOOL TERM_Init(void) DECLSPEC_HIDDEN; +extern BOOL TERM_Exit(void) DECLSPEC_HIDDEN; +extern unsigned TERM_FillSimpleChar(WCHAR real_inchar, INPUT_RECORD* ir) DECLSPEC_HIDDEN; +extern int TERM_FillInputRecord(const char* in, size_t len, INPUT_RECORD* ir) DECLSPEC_HIDDEN; #endif /* __WINE_CONSOLE_PRIVATE_H */ diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h index f180e7d..feeeb55 100644 --- a/dlls/kernel32/kernel_private.h +++ b/dlls/kernel32/kernel_private.h @@ -28,8 +28,8 @@ BOOL WINAPI VerifyConsoleIoHandle(HANDLE); HANDLE WINAPI DuplicateConsoleHandle(HANDLE, DWORD, BOOL, DWORD); BOOL WINAPI CloseConsoleHandle(HANDLE handle); HANDLE WINAPI GetConsoleInputWaitHandle(void); -BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params); -BOOL CONSOLE_Exit(void); +BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params) DECLSPEC_HIDDEN; +BOOL CONSOLE_Exit(void) DECLSPEC_HIDDEN; static inline BOOL is_console_handle(HANDLE h) { @@ -52,15 +52,15 @@ static inline obj_handle_t console_handle_unmap(HANDLE h) #define KERNEL32_CONSOLE_ALLOC ((HANDLE)1) #define KERNEL32_CONSOLE_SHELL ((HANDLE)2) -extern HMODULE kernel32_handle; +extern HMODULE kernel32_handle DECLSPEC_HIDDEN; -extern const WCHAR *DIR_Windows; -extern const WCHAR *DIR_System; -extern const WCHAR *DIR_SysWow64; +extern const WCHAR *DIR_Windows DECLSPEC_HIDDEN; +extern const WCHAR *DIR_System DECLSPEC_HIDDEN; +extern const WCHAR *DIR_SysWow64 DECLSPEC_HIDDEN; -extern void FILE_SetDosError(void); -extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc ); -extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen ); +extern void FILE_SetDosError(void) DECLSPEC_HIDDEN; +extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc ) DECLSPEC_HIDDEN; +extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen ) DECLSPEC_HIDDEN; /* return values for MODULE_GetBinaryType */ enum binary_type @@ -86,25 +86,25 @@ struct binary_info }; /* module.c */ -extern WCHAR *MODULE_get_dll_load_path( LPCWSTR module ); -extern void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info ); +extern WCHAR *MODULE_get_dll_load_path( LPCWSTR module ) DECLSPEC_HIDDEN; +extern void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info ) DECLSPEC_HIDDEN; -extern BOOL NLS_IsUnicodeOnlyLcid(LCID); +extern BOOL NLS_IsUnicodeOnlyLcid(LCID) DECLSPEC_HIDDEN; /* environ.c */ -extern void ENV_CopyStartupInformation(void); +extern void ENV_CopyStartupInformation(void) DECLSPEC_HIDDEN; /* computername.c */ -extern void COMPUTERNAME_Init(void); +extern void COMPUTERNAME_Init(void) DECLSPEC_HIDDEN; /* locale.c */ -extern void LOCALE_Init(void); -extern void LOCALE_InitRegistry(void); +extern void LOCALE_Init(void) DECLSPEC_HIDDEN; +extern void LOCALE_InitRegistry(void) DECLSPEC_HIDDEN; /* oldconfig.c */ -extern void convert_old_config(void); +extern void convert_old_config(void) DECLSPEC_HIDDEN; /* returns directory handle for named objects */ -extern HANDLE get_BaseNamedObjects_handle(void); +extern HANDLE get_BaseNamedObjects_handle(void) DECLSPEC_HIDDEN; #endif
1
0
0
0
Marcus Meissner : user32: Mark internal functions with hidden visibility.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 6148f785f901b78b1657f34eb201962b9ee45043 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6148f785f901b78b1657f34eb…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Apr 21 10:21:26 2011 +0200 user32: Mark internal functions with hidden visibility. --- dlls/user32/dde_private.h | 2 ++ dlls/user32/user_private.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/user32/dde_private.h b/dlls/user32/dde_private.h index c4e4fb4..d5f7f7b 100644 --- a/dlls/user32/dde_private.h +++ b/dlls/user32/dde_private.h @@ -236,6 +236,8 @@ extern WDML_INSTANCE* WDML_GetInstanceFromWnd(HWND hWnd) DECLSPEC_HIDDEN; extern void WDML_BroadcastDDEWindows(LPCWSTR clsName, UINT uMsg, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN; extern void WDML_NotifyThreadExit(DWORD tid) DECLSPEC_HIDDEN; +extern void WDML_NotifyThreadDetach(void) DECLSPEC_HIDDEN; + static inline void WDML_ExtractAck(WORD status, DDEACK* da) { diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index bd7d39e..92b52a3 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -204,11 +204,11 @@ struct dce; extern BOOL CLIPBOARD_ReleaseOwner(void) DECLSPEC_HIDDEN; extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN; -extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ); +extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN; extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN; extern void invalidate_dce( HWND hwnd, const RECT *rect ) DECLSPEC_HIDDEN; extern void erase_now( HWND hwnd, UINT rdw_flags ) DECLSPEC_HIDDEN; -extern void *get_hook_proc( void *proc, const WCHAR *module ); +extern void *get_hook_proc( void *proc, const WCHAR *module ) DECLSPEC_HIDDEN; extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN; extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags ) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : wininet: Use wrappers for HeapReAlloc calls.
by Alexandre Julliard
22 Apr '11
22 Apr '11
Module: wine Branch: master Commit: 55b2722816900ccb8b104ff18ed0142d8660793c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55b2722816900ccb8b104ff18…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 22 12:35:05 2011 +0200 wininet: Use wrappers for HeapReAlloc calls. --- dlls/wininet/ftp.c | 6 ++---- dlls/wininet/http.c | 12 ++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 79881cb..07052c2 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -3762,8 +3762,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe LPFILEPROPERTIESW tmpafp; sizeFilePropArray *= 2; - tmpafp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *lpafp, - sizeof(FILEPROPERTIESW)*sizeFilePropArray); + tmpafp = heap_realloc_zero(*lpafp, sizeof(FILEPROPERTIESW)*sizeFilePropArray); if (NULL == tmpafp) { bSuccess = FALSE; @@ -3781,8 +3780,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe { LPFILEPROPERTIESW tmpafp; - tmpafp = HeapReAlloc(GetProcessHeap(), 0, *lpafp, - sizeof(FILEPROPERTIESW)*indexFilePropArray); + tmpafp = heap_realloc(*lpafp, sizeof(FILEPROPERTIESW)*indexFilePropArray); if (NULL != tmpafp) *lpafp = tmpafp; } diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 2e1bc20..f1ed423 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -5359,7 +5359,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear) while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders) cchMaxRawHeaders *= 2; - temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); + temp = heap_realloc(lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); if (temp == NULL) goto lend; lpszRawHeaders = temp; memcpy(lpszRawHeaders+cchRawHeaders, buffer, (buflen-1)*sizeof(WCHAR)); @@ -5386,7 +5386,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear) { while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders) cchMaxRawHeaders *= 2; - temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); + temp = heap_realloc(lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); if (temp == NULL) goto lend; lpszRawHeaders = temp; memcpy(lpszRawHeaders+cchRawHeaders, buffer, (buflen-1)*sizeof(WCHAR)); @@ -5415,7 +5415,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear) if (cchRawHeaders + strlenW(szCrLf) > cchMaxRawHeaders) { cchMaxRawHeaders = cchRawHeaders + strlenW(szCrLf); - temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders + 1) * sizeof(WCHAR)); + temp = heap_realloc(lpszRawHeaders, (cchMaxRawHeaders + 1) * sizeof(WCHAR)); if (temp == NULL) goto lend; lpszRawHeaders = temp; } @@ -5589,7 +5589,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR len = origlen + valuelen + ((ch > 0) ? 2 : 0); - lpsztmp = HeapReAlloc(GetProcessHeap(), 0, lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR)); + lpsztmp = heap_realloc(lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR)); if (lpsztmp) { lphttpHdr->lpszValue = lpsztmp; @@ -5608,7 +5608,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR } else { - WARN("HeapReAlloc (%d bytes) failed\n",len+1); + WARN("heap_realloc (%d bytes) failed\n",len+1); res = ERROR_OUTOFMEMORY; } } @@ -5692,7 +5692,7 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHd TRACE("--> %s: %s\n", debugstr_w(lpHdr->lpszField), debugstr_w(lpHdr->lpszValue)); count = request->nCustHeaders + 1; if (count > 1) - lph = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, request->custHeaders, sizeof(HTTPHEADERW) * count); + lph = heap_realloc_zero(request->custHeaders, sizeof(HTTPHEADERW) * count); else lph = heap_alloc_zero(sizeof(HTTPHEADERW) * count);
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
94
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
Results per page:
10
25
50
100
200