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
June
May
April
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
April 2008
----- 2025 -----
June 2025
May 2025
April 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
4 participants
1278 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Added support for WS_EX_RIGHT in the button control.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: bbd9e229e3c2676e9db7ce64d6a87bb75f506e84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bbd9e229e3c2676e9db7ce64d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 19:26:34 2008 +0200 user32: Added support for WS_EX_RIGHT in the button control. --- dlls/user32/button.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 27f10b7..d1ba2c1 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -567,9 +567,8 @@ static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA /********************************************************************** * Convert button styles to flags used by DrawText. - * TODO: handle WS_EX_RIGHT extended style. */ -static UINT BUTTON_BStoDT(DWORD style) +static UINT BUTTON_BStoDT( DWORD style, DWORD ex_style ) { UINT dtStyle = DT_NOCLIP; /* We use SelectClipRgn to limit output */ @@ -593,6 +592,8 @@ static UINT BUTTON_BStoDT(DWORD style) /* all other flavours have left aligned text */ } + if (ex_style & WS_EX_RIGHT) dtStyle = DT_RIGHT | (dtStyle & ~(DT_LEFT | DT_CENTER)); + /* DrawText ignores vertical alignment for multiline text, * but we use these flags to align label manually. */ @@ -626,10 +627,11 @@ static UINT BUTTON_BStoDT(DWORD style) static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc) { LONG style = GetWindowLongW( hwnd, GWL_STYLE ); + LONG ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); WCHAR *text; ICONINFO iconInfo; BITMAP bm; - UINT dtStyle = BUTTON_BStoDT(style); + UINT dtStyle = BUTTON_BStoDT( style, ex_style ); RECT r = *rc; INT n;
1
0
0
0
Alexandre Julliard : winex11: Moved the WM_SYSCOMMAND handling to window.c.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 24dbaa0856a229e1ed64e9ce778e05fd3375ac95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24dbaa0856a229e1ed64e9ce7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 16:13:34 2008 +0200 winex11: Moved the WM_SYSCOMMAND handling to window.c. --- dlls/winex11.drv/window.c | 134 +++++++++++++++++++++++++++++++++++++++++++++ dlls/winex11.drv/winpos.c | 134 --------------------------------------------- 2 files changed, 134 insertions(+), 134 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=24dbaa0856a229e1ed64e…
1
0
0
0
Alexandre Julliard : winex11: Moved the MapNotify handler to event.c.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 64e812840998ad0cb1a90f805063a4e52dd3023e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64e812840998ad0cb1a90f805…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 16:13:12 2008 +0200 winex11: Moved the MapNotify handler to event.c. --- dlls/winex11.drv/event.c | 19 +++++++++++++++++++ dlls/winex11.drv/winpos.c | 18 ------------------ dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index fc126c2..adbf585 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -76,6 +76,7 @@ extern BOOL ximInComposeMode; static void X11DRV_FocusIn( HWND hwnd, XEvent *event ); static void X11DRV_FocusOut( HWND hwnd, XEvent *event ); static void X11DRV_Expose( HWND hwnd, XEvent *event ); +static void X11DRV_MapNotify( HWND hwnd, XEvent *event ); static void X11DRV_PropertyNotify( HWND hwnd, XEvent *event ); static void X11DRV_ClientMessage( HWND hwnd, XEvent *event ); @@ -711,6 +712,24 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev ) } +/********************************************************************** + * X11DRV_MapNotify + */ +static void X11DRV_MapNotify( HWND hwnd, XEvent *event ) +{ + struct x11drv_win_data *data; + + if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!data->mapped) return; + + if (!data->managed) + { + HWND hwndFocus = GetFocus(); + if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ + } +} + + /*********************************************************************** * get_window_wm_state */ diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 8c904ad..43d388a 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -478,24 +478,6 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags, } -/********************************************************************** - * X11DRV_MapNotify - */ -void X11DRV_MapNotify( HWND hwnd, XEvent *event ) -{ - struct x11drv_win_data *data; - - if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (!data->mapped) return; - - if (!data->managed) - { - HWND hwndFocus = GetFocus(); - if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ - } -} - - struct desktop_resize_data { RECT old_screen_rect; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index b040e05..30b339e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -642,7 +642,6 @@ extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event ); extern void X11DRV_KeyEvent( HWND hwnd, XEvent *event ); extern void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ); extern void X11DRV_DestroyNotify( HWND hwnd, XEvent *event ); -extern void X11DRV_MapNotify( HWND hwnd, XEvent *event ); extern void X11DRV_ConfigureNotify( HWND hwnd, XEvent *event ); extern void X11DRV_SelectionRequest( HWND hWnd, XEvent *event ); extern void X11DRV_SelectionClear( HWND hWnd, XEvent *event );
1
0
0
0
Alexandre Julliard : winex11: Moved the ExposeEvent handler to event.c.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 585da9296d7559784c5a72474be4c9eb58ebc1c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=585da9296d7559784c5a72474…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 16:07:06 2008 +0200 winex11: Moved the ExposeEvent handler to event.c. Use consistent naming for all event handlers. --- dlls/winex11.drv/event.c | 85 ++++++++++++++++++++++++++++++++++++-------- dlls/winex11.drv/winpos.c | 51 --------------------------- dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 69 insertions(+), 68 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 377e8f4..fc126c2 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -51,6 +51,7 @@ #include "shlobj.h" /* DROPFILES */ #include "shellapi.h" +#include "wine/server.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(event); @@ -72,10 +73,11 @@ extern BOOL ximInComposeMode; #define DndURL 128 /* KDE drag&drop */ /* Event handlers */ -static void EVENT_FocusIn( HWND hwnd, XEvent *event ); -static void EVENT_FocusOut( HWND hwnd, XEvent *event ); -static void EVENT_PropertyNotify( HWND hwnd, XEvent *event ); -static void EVENT_ClientMessage( HWND hwnd, XEvent *event ); +static void X11DRV_FocusIn( HWND hwnd, XEvent *event ); +static void X11DRV_FocusOut( HWND hwnd, XEvent *event ); +static void X11DRV_Expose( HWND hwnd, XEvent *event ); +static void X11DRV_PropertyNotify( HWND hwnd, XEvent *event ); +static void X11DRV_ClientMessage( HWND hwnd, XEvent *event ); struct event_handler { @@ -95,8 +97,8 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] = { MotionNotify, X11DRV_MotionNotify }, { EnterNotify, X11DRV_EnterNotify }, /* LeaveNotify */ - { FocusIn, EVENT_FocusIn }, - { FocusOut, EVENT_FocusOut }, + { FocusIn, X11DRV_FocusIn }, + { FocusOut, X11DRV_FocusOut }, { KeymapNotify, X11DRV_KeymapNotify }, { Expose, X11DRV_Expose }, /* GraphicsExpose */ @@ -114,12 +116,12 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] = /* ResizeRequest */ /* CirculateNotify */ /* CirculateRequest */ - { PropertyNotify, EVENT_PropertyNotify }, + { PropertyNotify, X11DRV_PropertyNotify }, { SelectionClear, X11DRV_SelectionClear }, { SelectionRequest, X11DRV_SelectionRequest }, /* SelectionNotify */ /* ColormapNotify */ - { ClientMessage, EVENT_ClientMessage }, + { ClientMessage, X11DRV_ClientMessage }, { MappingNotify, X11DRV_MappingNotify }, }; @@ -568,9 +570,9 @@ static const char * const focus_details[] = }; /********************************************************************** - * EVENT_FocusIn + * X11DRV_FocusIn */ -static void EVENT_FocusIn( HWND hwnd, XEvent *xev ) +static void X11DRV_FocusIn( HWND hwnd, XEvent *xev ) { XFocusChangeEvent *event = &xev->xfocus; XIC xic; @@ -602,11 +604,11 @@ static void EVENT_FocusIn( HWND hwnd, XEvent *xev ) /********************************************************************** - * EVENT_FocusOut + * X11DRV_FocusOut * * Note: only top-level windows get FocusOut events. */ -static void EVENT_FocusOut( HWND hwnd, XEvent *xev ) +static void X11DRV_FocusOut( HWND hwnd, XEvent *xev ) { XFocusChangeEvent *event = &xev->xfocus; HWND hwnd_tmp; @@ -659,6 +661,57 @@ static void EVENT_FocusOut( HWND hwnd, XEvent *xev ) /*********************************************************************** + * X11DRV_Expose + */ +static void X11DRV_Expose( HWND hwnd, XEvent *xev ) +{ + XExposeEvent *event = &xev->xexpose; + RECT rect; + struct x11drv_win_data *data; + int flags = RDW_INVALIDATE | RDW_ERASE; + + TRACE( "win %p (%lx) %d,%d %dx%d\n", + hwnd, event->window, event->x, event->y, event->width, event->height ); + + if (!(data = X11DRV_get_win_data( hwnd ))) return; + + if (event->window == data->whole_window) + { + rect.left = data->whole_rect.left + event->x; + rect.top = data->whole_rect.top + event->y; + flags |= RDW_FRAME; + } + else + { + rect.left = data->client_rect.left + event->x; + rect.top = data->client_rect.top + event->y; + } + rect.right = rect.left + event->width; + rect.bottom = rect.top + event->height; + + if (event->window != root_window) + { + SERVER_START_REQ( update_window_zorder ) + { + req->window = hwnd; + req->rect.left = rect.left; + req->rect.top = rect.top; + req->rect.right = rect.right; + req->rect.bottom = rect.bottom; + wine_server_call( req ); + } + SERVER_END_REQ; + + /* make position relative to client area instead of parent */ + OffsetRect( &rect, -data->client_rect.left, -data->client_rect.top ); + flags |= RDW_ALLCHILDREN; + } + + RedrawWindow( hwnd, &rect, 0, flags ); +} + + +/*********************************************************************** * get_window_wm_state */ int get_window_wm_state( Display *display, struct x11drv_win_data *data ) @@ -755,9 +808,9 @@ static void handle_wm_state_notify( struct x11drv_win_data *data, XPropertyEvent /*********************************************************************** - * EVENT_PropertyNotify + * X11DRV_PropertyNotify */ -static void EVENT_PropertyNotify( HWND hwnd, XEvent *xev ) +static void X11DRV_PropertyNotify( HWND hwnd, XEvent *xev ) { XPropertyEvent *event = &xev->xproperty; struct x11drv_win_data *data; @@ -1130,9 +1183,9 @@ static const struct client_message_handler client_messages[] = /********************************************************************** - * EVENT_ClientMessage + * X11DRV_ClientMessage */ -static void EVENT_ClientMessage( HWND hwnd, XEvent *xev ) +static void X11DRV_ClientMessage( HWND hwnd, XEvent *xev ) { XClientMessageEvent *event = &xev->xclient; unsigned int i; diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index f6b75d6..8c904ad 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -61,57 +61,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); static const char managed_prop[] = "__wine_x11_managed"; /*********************************************************************** - * X11DRV_Expose - */ -void X11DRV_Expose( HWND hwnd, XEvent *xev ) -{ - XExposeEvent *event = &xev->xexpose; - RECT rect; - struct x11drv_win_data *data; - int flags = RDW_INVALIDATE | RDW_ERASE; - - TRACE( "win %p (%lx) %d,%d %dx%d\n", - hwnd, event->window, event->x, event->y, event->width, event->height ); - - if (!(data = X11DRV_get_win_data( hwnd ))) return; - - if (event->window == data->whole_window) - { - rect.left = data->whole_rect.left + event->x; - rect.top = data->whole_rect.top + event->y; - flags |= RDW_FRAME; - } - else - { - rect.left = data->client_rect.left + event->x; - rect.top = data->client_rect.top + event->y; - } - rect.right = rect.left + event->width; - rect.bottom = rect.top + event->height; - - if (event->window != root_window) - { - SERVER_START_REQ( update_window_zorder ) - { - req->window = hwnd; - req->rect.left = rect.left; - req->rect.top = rect.top; - req->rect.right = rect.right; - req->rect.bottom = rect.bottom; - wine_server_call( req ); - } - SERVER_END_REQ; - - /* make position relative to client area instead of parent */ - OffsetRect( &rect, -data->client_rect.left, -data->client_rect.top ); - flags |= RDW_ALLCHILDREN; - } - - RedrawWindow( hwnd, &rect, 0, flags ); -} - - -/*********************************************************************** * update_net_wm_states */ static void update_net_wm_states( Display *display, struct x11drv_win_data *data ) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index e682f07..b040e05 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -641,7 +641,6 @@ extern void X11DRV_MotionNotify( HWND hwnd, XEvent *event ); extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event ); extern void X11DRV_KeyEvent( HWND hwnd, XEvent *event ); extern void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ); -extern void X11DRV_Expose( HWND hwnd, XEvent *event ); extern void X11DRV_DestroyNotify( HWND hwnd, XEvent *event ); extern void X11DRV_MapNotify( HWND hwnd, XEvent *event ); extern void X11DRV_ConfigureNotify( HWND hwnd, XEvent *event );
1
0
0
0
Maarten Lankhorst : server: Make enum_desktop enumerate all the desktops on the window station with the DESKTOP_ENUMERATE right .
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 3fd1fc760046165e63146a2803b510079ee00035 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3fd1fc760046165e63146a280…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Tue Apr 15 16:38:58 2008 -0700 server: Make enum_desktop enumerate all the desktops on the window station with the DESKTOP_ENUMERATE right. --- server/winstation.c | 27 +++++++++++---------------- 1 files changed, 11 insertions(+), 16 deletions(-) diff --git a/server/winstation.c b/server/winstation.c index cde4923..817fe77 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -659,28 +659,23 @@ DECL_HANDLER(enum_desktop) { struct winstation *winstation; struct desktop *desktop; - unsigned int index = req->index; - obj_handle_t handle; + unsigned int index = 0; if (!(winstation = (struct winstation *)get_handle_obj( current->process, req->winstation, WINSTA_ENUMDESKTOPS, &winstation_ops ))) return; - while ((handle = enumerate_handles( current->process, &desktop_ops, &index ))) + LIST_FOR_EACH_ENTRY( desktop, &winstation->desktops, struct desktop, entry ) { - if (!(desktop = get_desktop_obj( current->process, handle, DESKTOP_ENUMERATE ))) - continue; - - if (desktop->winstation == winstation) - { - set_reply_data_obj_name( &desktop->obj ); - release_object( desktop ); - release_object( winstation ); - clear_error(); - reply->next = index; - return; - } - release_object( desktop ); + unsigned int access = DESKTOP_ENUMERATE; + if (req->index > index++) continue; + if (!desktop->obj.name) continue; + if (!check_object_access( &desktop->obj, &access )) continue; + set_reply_data_obj_name( &desktop->obj ); + release_object( winstation ); + clear_error(); + reply->next = index; + return; } release_object( winstation );
1
0
0
0
Maarten Lankhorst : server: Make enum_winstations enumerate all the window stations with WINSTA_ENUMERATE right .
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 81069001ea65cd517b62e2a80cd28e35be044794 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81069001ea65cd517b62e2a80…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Tue Apr 15 14:32:43 2008 -0700 server: Make enum_winstations enumerate all the window stations with WINSTA_ENUMERATE right. --- server/winstation.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/winstation.c b/server/winstation.c index 720bb12..cde4923 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -37,6 +37,7 @@ #include "process.h" #include "user.h" #include "file.h" +#include "security.h" #include "wine/unicode.h" @@ -636,16 +637,15 @@ DECL_HANDLER(set_user_object_info) /* enumerate window stations */ DECL_HANDLER(enum_winstation) { - unsigned int index = req->index; - obj_handle_t handle; - struct object *obj; + unsigned int index = 0; + struct winstation *winsta; - while ((handle = enumerate_handles( current->process, &winstation_ops, &index ))) + LIST_FOR_EACH_ENTRY( winsta, &winstation_list, struct winstation, entry ) { - if (!(obj = get_handle_obj( current->process, handle, WINSTA_ENUMERATE, &winstation_ops ))) - continue; - set_reply_data_obj_name( obj ); - release_object( obj ); + unsigned int access = WINSTA_ENUMERATE; + if (req->index > index++) continue; + if (!check_object_access( &winsta->obj, &access )) continue; + set_reply_data_obj_name( &winsta->obj ); clear_error(); reply->next = index; return;
1
0
0
0
Reece Dunn : shlwapi/tests: Enumerate the STGM sharing modes in the SHCreateStreamOnFile tests.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: fa7f16562e8b60abea2970d1d9f079547d62e3cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa7f16562e8b60abea2970d1d…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Apr 13 14:05:07 2008 +0100 shlwapi/tests: Enumerate the STGM sharing modes in the SHCreateStreamOnFile tests. --- dlls/shlwapi/tests/istream.c | 70 ++++++++++++++++++++++++------------------ 1 files changed, 40 insertions(+), 30 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fa7f16562e8b60abea297…
1
0
0
0
Reece Dunn : shlwapi: Fixed the todo blocks in the SHCreateStreamOnFile tests.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 8ea25acd7306994169ab5b46997629051d0aaa63 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ea25acd7306994169ab5b469…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Tue Apr 15 21:16:03 2008 +0100 shlwapi: Fixed the todo blocks in the SHCreateStreamOnFile tests. --- dlls/shlwapi/istream.c | 37 +++++++++++++++---------------------- dlls/shlwapi/tests/istream.c | 31 ------------------------------- 2 files changed, 15 insertions(+), 53 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8ea25acd7306994169ab5…
1
0
0
0
Nikolay Sivov : gdiplus: Implement GdipCreatePath2I.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: ae576c40b8b4d85ea39c8ef4c4a32dfc6646ad3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae576c40b8b4d85ea39c8ef4c…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 17 03:02:27 2008 +0400 gdiplus: Implement GdipCreatePath2I. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 21 +++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 23 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 14e32eb..f697e50 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -114,7 +114,7 @@ @ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr) @ stub GdipCreateMetafileFromWmfFile @ stdcall GdipCreatePath2(ptr ptr long long ptr) -@ stub GdipCreatePath2I +@ stdcall GdipCreatePath2I(ptr ptr long long ptr) @ stdcall GdipCreatePath(long ptr) @ stdcall GdipCreatePathGradient(ptr long long ptr) @ stdcall GdipCreatePathGradientFromPath(ptr ptr) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 5c2e287..0375f8e 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -403,6 +403,27 @@ GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF* points, return Ok; } +GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint* points, + GDIPCONST BYTE* types, INT count, GpFillMode fill, GpPath **path) +{ + GpPointF *ptF; + GpStatus ret; + INT i; + + ptF = GdipAlloc(sizeof(GpPointF)*count); + + for(i = 0;i < count; i++){ + ptF[i].X = (REAL)points[i].X; + ptF[i].Y = (REAL)points[i].Y; + } + + ret = GdipCreatePath2(ptF, types, count, fill, path); + + GdipFree(ptF); + + return ret; +} + GpStatus WINGDIPAPI GdipDeletePath(GpPath *path) { if(!path) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 3819e99..a9cdc54 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -198,6 +198,7 @@ GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT, GpFillMode,GpPath**); +GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipDeletePath(GpPath*); GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*); GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT);
1
0
0
0
Nikolay Sivov : gdiplus: Implement GdipCreateMatrix3I.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 0f42f4c532ab21c3f7f8acce3c36cbb2661a7508 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f42f4c532ab21c3f7f8acce3…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 17 03:02:05 2008 +0400 gdiplus: Implement GdipCreateMatrix3I. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 17 +++++++++++++++++ include/gdiplusflat.h | 2 ++ 3 files changed, 20 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index d87979e..14e32eb 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -106,7 +106,7 @@ @ stub GdipCreateLineBrushI @ stdcall GdipCreateMatrix2(long long long long long long ptr) @ stdcall GdipCreateMatrix3(ptr ptr ptr) -@ stub GdipCreateMatrix3I +@ stdcall GdipCreateMatrix3I(ptr ptr ptr) @ stdcall GdipCreateMatrix(ptr) @ stdcall GdipCreateMetafileFromEmf(ptr long ptr) @ stub GdipCreateMetafileFromFile diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index 2ee4458..dee6460 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -89,6 +89,23 @@ GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *rect, return Ok; } +GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint *pt, + GpMatrix **matrix) +{ + GpRectF rectF; + GpPointF ptF; + + rectF.X = (REAL)rect->X; + rectF.Y = (REAL)rect->Y; + rectF.Width = (REAL)rect->Width; + rectF.Height = (REAL)rect->Height; + + ptF.X = (REAL)pt->X; + ptF.Y = (REAL)pt->Y; + + return GdipCreateMatrix3(&rectF, &ptF, matrix); +} + GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone) { if(!matrix || !clone) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 933475e..3819e99 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -219,6 +219,8 @@ GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *,GDIPCONST GpPointF*, GpMatrix**); +GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect*,GDIPCONST GpPoint*,GpMatrix**); + GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder);
1
0
0
0
Nikolay Sivov : gdiplus: Implement GdipAddPathArcI.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: fd0cbca787bda5f207d452a18f6a0e32cd57f1ec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd0cbca787bda5f207d452a18…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Apr 16 21:47:25 2008 +0400 gdiplus: Implement GdipAddPathArcI. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 6 ++++++ include/gdiplusflat.h | 1 + 3 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4ccd213..d87979e 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -1,5 +1,5 @@ @ stdcall GdipAddPathArc(ptr long long long long long long) -@ stub GdipAddPathArcI +@ stdcall GdipAddPathArcI(ptr long long long long long long) @ stub GdipAddPathBezier @ stdcall GdipAddPathBezierI(ptr long long long long long long long long) @ stdcall GdipAddPathBeziers(ptr ptr long) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 5d5e5fc..5c2e287 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -97,6 +97,12 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, return Ok; } +GpStatus WINGDIPAPI GdipAddPathArcI(GpPath *path, INT x1, INT y1, INT x2, + INT y2, REAL startAngle, REAL sweepAngle) +{ + return GdipAddPathArc(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,startAngle,sweepAngle); +} + GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index bc97ef4..933475e 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -182,6 +182,7 @@ GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill*,ARGB); GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
1
0
0
0
Nikolay Sivov : gdiplus: Implement GdipAddPathLine2I.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 8360caabfa9dc7e45719c5331d7f339a7cc763af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8360caabfa9dc7e45719c5331…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Apr 16 21:47:19 2008 +0400 gdiplus: Implement GdipAddPathLine2I. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 24 ++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 5c5e0a8..4ccd213 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -17,7 +17,7 @@ @ stdcall GdipAddPathEllipse(ptr long long long long) @ stub GdipAddPathEllipseI @ stdcall GdipAddPathLine2(ptr ptr long) -@ stub GdipAddPathLine2I +@ stdcall GdipAddPathLine2I(ptr ptr long) @ stub GdipAddPathLine @ stdcall GdipAddPathLineI(ptr long long long long) @ stdcall GdipAddPathPath(ptr ptr long) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index adeaa89..5d5e5fc 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -217,6 +217,30 @@ GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, return Ok; } +GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath *path, GDIPCONST GpPoint *points, INT count) +{ + GpPointF *pointsF; + INT i; + GpStatus stat; + + if(count <= 0) + return InvalidParameter; + + pointsF = GdipAlloc(sizeof(GpPointF) * count); + if(!pointsF) return OutOfMemory; + + for(i = 0;i < count; i++){ + pointsF[i].X = (REAL)points[i].X; + pointsF[i].Y = (REAL)points[i].Y; + } + + stat = GdipAddPathLine2(path, pointsF, count); + + GdipFree(pointsF); + + return stat; +} + GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2) { INT old_count; diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index f615e5b..bc97ef4 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -188,6 +188,7 @@ GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); +GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL); GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**);
1
0
0
0
Nikolay Sivov : gdiplus: Implement GdipCloneStringFormat.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 6ba525d8c41978e1761fc66bacc02517a930d2e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ba525d8c41978e1761fc66ba…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Apr 16 21:47:12 2008 +0400 gdiplus: Implement GdipCloneStringFormat. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/stringformat.c | 15 +++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 337ffb2..5c5e0a8 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -58,7 +58,7 @@ @ stdcall GdipClonePath(ptr ptr) @ stdcall GdipClonePen(ptr ptr) @ stub GdipCloneRegion -@ stub GdipCloneStringFormat +@ stdcall GdipCloneStringFormat(ptr ptr) @ stdcall GdipClosePathFigure(ptr) @ stdcall GdipClosePathFigures(ptr) @ stub GdipCombineRegionPath diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 7de1c2c..bd5d6ad 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -152,3 +152,18 @@ GpStatus WINGDIPAPI GdipSetStringFormatFlags(GDIPCONST GpStringFormat *format, I return Ok; } + +GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat *format, GpStringFormat **newFormat) +{ + if(!format || !newFormat) + return InvalidParameter; + + *newFormat = GdipAlloc(sizeof(GpStringFormat)); + if(!*newFormat) return OutOfMemory; + + **newFormat = *format; + + TRACE("%p %p\n",format,newFormat); + + return Ok; +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index e92c646..f615e5b 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -316,6 +316,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT); GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); +GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat*,GpStringFormat**); #ifdef __cplusplus }
1
0
0
0
James Hawkins : oleaut32: Fix a few tests that fail in win2k.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 04b820c354dac0180589bfc6536bbd19041753f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04b820c354dac0180589bfc65…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 17:12:02 2008 -0500 oleaut32: Fix a few tests that fail in win2k. --- dlls/oleaut32/tests/vartest.c | 38 ++++++++++++++++++++++++++++---------- 1 files changed, 28 insertions(+), 10 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index c86ec95..a5a462c 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -6859,11 +6859,20 @@ static void test_VarPow(void) "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); hres = pVarPow(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); + if (hres == S_OK) + { + ok(hres == S_OK && V_VT(&result) == VT_R8, + "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + S_OK, hres, vtstr(V_VT(&result))); + ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), + "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); + } + else + { + ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, + "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); + } hres = pVarPow(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, @@ -6887,11 +6896,20 @@ static void test_VarPow(void) "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); hres = pVarPow(&dec, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); + if (hres == S_OK) + { + ok(hres == S_OK && V_VT(&result) == VT_R8, + "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + S_OK, hres, vtstr(V_VT(&result))); + ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), + "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); + } + else + { + ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, + "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); + } SysFreeString(num2_str); SysFreeString(num3_str);
1
0
0
0
James Hawkins : ole32: Fix a few tests that fail in win2k.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 1edb56cec8fc1dde3e41f6ee991d43804598f5ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1edb56cec8fc1dde3e41f6ee9…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 16:39:45 2008 -0500 ole32: Fix a few tests that fail in win2k. --- dlls/ole32/tests/marshal.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index acea854..a1b9c15 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2550,8 +2550,9 @@ static void test_local_server(void) hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, NULL, &IID_IClassFactory, (LPVOID*)&cf); ok(hr == CO_E_SERVER_STOPPING || /* NT */ + hr == REGDB_E_CLASSNOTREG || /* win2k */ hr == S_OK /* Win9x */, - "CoGetClassObject should have returned CO_E_SERVER_STOPPING instead of 0x%08x\n", hr); + "CoGetClassObject should have returned CO_E_SERVER_STOPPING or REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); hr = CoRevokeClassObject(cookie); ok_ole_success(hr, CoRevokeClassObject); @@ -2594,8 +2595,9 @@ static DWORD CALLBACK get_global_interface_proc(LPVOID pv) IClassFactory *cf; hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf); - ok(hr == CO_E_NOTINITIALIZED, - "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED instead of 0x%08x\n", + ok(hr == CO_E_NOTINITIALIZED || + hr == E_UNEXPECTED, /* win2k */ + "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED or E_UNEXPECTED instead of 0x%08x\n", hr); CoInitialize(NULL);
1
0
0
0
James Hawkins : kernel32: Fix a test that fails in win2k and up.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: c5ebc4acb0af3da2799e58fab6c7f73a3184c51b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5ebc4acb0af3da2799e58fab…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 16:30:19 2008 -0500 kernel32: Fix a test that fails in win2k and up. --- dlls/kernel32/tests/volume.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index f238146..9a21db1 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -49,7 +49,7 @@ static void test_query_dos_deviceA(void) static void test_FindFirstVolume(void) { - char volume[50]; + char volume[51]; HANDLE handle; if (!pFindFirstVolumeA) { @@ -65,7 +65,7 @@ static void test_FindFirstVolume(void) handle = pFindFirstVolumeA( volume, 49 ); ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); ok( GetLastError() == ERROR_FILENAME_EXCED_RANGE, "wrong error %u\n", GetLastError() ); - handle = pFindFirstVolumeA( volume, 50 ); + handle = pFindFirstVolumeA( volume, 51 ); ok( handle != INVALID_HANDLE_VALUE, "failed err %u\n", GetLastError() ); if (handle != INVALID_HANDLE_VALUE) {
1
0
0
0
James Hawkins : kernel32: Fix a test that fails in win2k.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: c009d1e9c431d461f37569d2ddf68921bf67bcab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c009d1e9c431d461f37569d2d…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 16:02:21 2008 -0500 kernel32: Fix a test that fails in win2k. --- dlls/kernel32/tests/locale.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 47f50b1..60e6f11 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -1002,7 +1002,9 @@ static void test_CompareStringA(void) ok(ret == 2, "a vs a expected 2, got %d\n", ret); ret = CompareStringA(lcid, 0, "a\0b", 4, "a", 2); - ok(ret == 3, "a\\0b vs a expected 3, got %d\n", ret); + ok(ret == CSTR_EQUAL || /* win2k */ + ret == CSTR_GREATER_THAN, + "a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n", ret); ret = CompareStringA(lcid, 0, "\2", 2, "\1", 2); todo_wine ok(ret != 2, "\\2 vs \\1 expected unequal\n");
1
0
0
0
Alexandre Julliard : server: Keep a file descriptor open to the config directory to make sure we don' t write the registry in the wrong place.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 161160f05ae2340ab5bb35307ca02056cbca68e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=161160f05ae2340ab5bb35307…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 12:41:34 2008 +0200 server: Keep a file descriptor open to the config directory to make sure we don't write the registry in the wrong place. --- server/registry.c | 57 +++++++++++++++++++--------------------------------- server/request.c | 11 ++++++++- server/request.h | 1 + 3 files changed, 31 insertions(+), 38 deletions(-) diff --git a/server/registry.c b/server/registry.c index 5084892..d2c0b23 100644 --- a/server/registry.c +++ b/server/registry.c @@ -112,7 +112,7 @@ static void set_periodic_save_timer(void); struct save_branch_info { struct key *key; - char *path; + const char *path; }; #define MAX_SAVE_BRANCH_INFO 3 @@ -1396,11 +1396,9 @@ static void load_init_registry_from_file( const char *filename, struct key *key assert( save_branch_count < MAX_SAVE_BRANCH_INFO ); - if ((save_branch_info[save_branch_count].path = strdup( filename ))) - { - save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); - make_object_static( &key->obj ); - } + save_branch_info[save_branch_count].path = filename; + save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); + make_object_static( &key->obj ); } static WCHAR *format_user_registry_path( const SID *sid, struct unicode_str *path ) @@ -1438,27 +1436,24 @@ void init_registry(void) WCHAR *current_user_path; struct unicode_str current_user_str; - const char *config = wine_get_config_dir(); - char *p, *filename; struct key *key; int dummy; + /* switch to the config dir */ + + if (fchdir( config_dir_fd ) == -1) fatal_perror( "chdir to config dir" ); + /* create the root key */ root_key = alloc_key( &root_name, time(NULL) ); assert( root_key ); make_object_static( &root_key->obj ); - if (!(filename = malloc( strlen(config) + 16 ))) fatal_error( "out of memory\n" ); - strcpy( filename, config ); - p = filename + strlen(filename); - /* load system.reg into Registry\Machine */ if (!(key = create_key( root_key, &HKLM_name, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create Machine registry key\n" ); - strcpy( p, "/system.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "system.reg", key ); release_object( key ); /* load userdef.reg into Registry\User\.Default */ @@ -1466,8 +1461,7 @@ void init_registry(void) if (!(key = create_key( root_key, &HKU_name, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create User\\.Default registry key\n" ); - strcpy( p, "/userdef.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "userdef.reg", key ); release_object( key ); /* load user.reg into HKEY_CURRENT_USER */ @@ -1478,14 +1472,14 @@ void init_registry(void) !(key = create_key( root_key, ¤t_user_str, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create HKEY_CURRENT_USER registry key\n" ); free( current_user_path ); - strcpy( p, "/user.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "user.reg", key ); release_object( key ); - free( filename ); - /* start the periodic save timer */ set_periodic_save_timer(); + + /* go back to the server dir */ + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); } /* save a registry branch to a file */ @@ -1532,8 +1526,8 @@ static void save_registry( struct key *key, obj_handle_t handle ) static int save_branch( struct key *key, const char *path ) { struct stat st; - char *p, *real, *tmp = NULL; - int fd, count = 0, ret = 0, by_symlink; + char *p, *tmp = NULL; + int fd, count = 0, ret = 0; FILE *f; if (!(key->flags & KEY_DIRTY)) @@ -1542,25 +1536,13 @@ static int save_branch( struct key *key, const char *path ) return 1; } - /* get the real path */ - - by_symlink = (!lstat(path, &st) && S_ISLNK (st.st_mode)); - if (!(real = malloc( PATH_MAX ))) return 0; - if (!realpath( path, real )) - { - free( real ); - real = NULL; - } - else path = real; - /* test the file type */ if ((fd = open( path, O_WRONLY )) != -1) { /* if file is not a regular file or has multiple links or is accessed * via symbolic links, write directly into it; otherwise use a temp file */ - if (by_symlink || - (!fstat( fd, &st ) && (!S_ISREG(st.st_mode) || st.st_nlink > 1))) + if (!lstat( path, &st ) && (!S_ISREG(st.st_mode) || st.st_nlink > 1)) { ftruncate( fd, 0 ); goto save; @@ -1610,7 +1592,6 @@ static int save_branch( struct key *key, const char *path ) done: free( tmp ); - free( real ); if (ret) make_clean( key ); return ret; } @@ -1620,9 +1601,11 @@ static void periodic_save( void *arg ) { int i; + if (fchdir( config_dir_fd ) == -1) return; save_timeout_user = NULL; for (i = 0; i < save_branch_count; i++) save_branch( save_branch_info[i].key, save_branch_info[i].path ); + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); set_periodic_save_timer(); } @@ -1638,6 +1621,7 @@ void flush_registry(void) { int i; + if (fchdir( config_dir_fd ) == -1) return; for (i = 0; i < save_branch_count; i++) { if (!save_branch( save_branch_info[i].key, save_branch_info[i].path )) @@ -1647,6 +1631,7 @@ void flush_registry(void) perror( " " ); } } + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); } diff --git a/server/request.c b/server/request.c index 9a2c7b1..8726e1c 100644 --- a/server/request.c +++ b/server/request.c @@ -120,6 +120,8 @@ static const struct fd_ops master_socket_fd_ops = struct thread *current = NULL; /* thread handling the current request */ unsigned int global_error = 0; /* global error code for when no thread is current */ timeout_t server_start_time = 0; /* server startup time */ +int server_dir_fd = -1; /* file descriptor for the server dir */ +int config_dir_fd = -1; /* file descriptor for the config dir */ static struct master_socket *master_socket; /* the master socket object */ static struct timeout_user *master_timeout; @@ -553,7 +555,8 @@ static void create_server_dir( const char *dir ) create_dir( server_dir, &st ); if (chdir( server_dir ) == -1) fatal_perror( "chdir %s", server_dir ); - if (stat( ".", &st2 ) == -1) fatal_perror( "stat %s", server_dir ); + if ((server_dir_fd = open( ".", O_RDONLY )) == -1) fatal_perror( "open %s", server_dir ); + if (fstat( server_dir_fd, &st2 ) == -1) fatal_perror( "stat %s", server_dir ); if (st.st_dev != st2.st_dev || st.st_ino != st2.st_ino) fatal_error( "chdir did not end up in %s\n", server_dir ); @@ -733,6 +736,7 @@ static void acquire_lock(void) void open_master_socket(void) { const char *server_dir = wine_get_server_dir(); + const char *config_dir = wine_get_config_dir(); int fd, pid, status, sync_pipe[2]; char dummy; @@ -740,7 +744,10 @@ void open_master_socket(void) assert( sizeof(union generic_request) == sizeof(struct request_max_size) ); assert( sizeof(union generic_reply) == sizeof(struct request_max_size) ); - if (!server_dir) fatal_error( "directory %s cannot be accessed\n", wine_get_config_dir() ); + if (!server_dir) fatal_error( "directory %s cannot be accessed\n", config_dir ); + if (chdir( config_dir ) == -1) fatal_perror( "chdir to %s", config_dir ); + if ((config_dir_fd = open( ".", O_RDONLY )) == -1) fatal_perror( "open %s", config_dir ); + create_server_dir( server_dir ); if (!foreground) diff --git a/server/request.h b/server/request.h index 283ad97..496c5ff 100644 --- a/server/request.h +++ b/server/request.h @@ -61,6 +61,7 @@ extern void close_master_socket( timeout_t timeout ); extern void shutdown_master_socket(void); extern int wait_for_lock(void); extern int kill_lock_owner( int sig ); +extern int server_dir_fd, config_dir_fd; extern void trace_request(void); extern void trace_reply( enum request req, const union generic_reply *reply );
1
0
0
0
James Hawkins : fusion: Explicitly check for -1 for a missing table.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: e52e5e67159753cdc0c5abfa409f71c0710dab47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e52e5e67159753cdc0c5abfa4…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Apr 16 11:48:31 2008 -0500 fusion: Explicitly check for -1 for a missing table. --- dlls/fusion/assembly.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c index 024e611..eee889a 100644 --- a/dlls/fusion/assembly.c +++ b/dlls/fusion/assembly.c @@ -416,7 +416,7 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPSTR *name) ULONG offset; offset = assembly->tables[0x20].offset; /* FIXME: add constants */ - if (offset < 0) + if (offset == -1) return E_FAIL; asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset); @@ -527,7 +527,7 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPSTR *token) *token = NULL; offset = assembly->tables[0x20].offset; /* FIXME: add constants */ - if (offset < 0) + if (offset == -1) return E_FAIL; asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset);
1
0
0
0
Dmitry Timoshkov : winedump: Print names for all known EMF records.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: d43758b2744be43e509ae06288fd60cd6a9ecb8f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d43758b2744be43e509ae0628…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Apr 17 19:15:43 2008 +0900 winedump: Print names for all known EMF records. --- tools/winedump/emf.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 98 insertions(+), 1 deletions(-) diff --git a/tools/winedump/emf.c b/tools/winedump/emf.c index f5375d0..7975e21 100644 --- a/tools/winedump/emf.c +++ b/tools/winedump/emf.c @@ -62,32 +62,129 @@ static int dump_emfrecord(void) switch(type) { EMRCASE(EMR_HEADER); + EMRCASE(EMR_POLYBEZIER); EMRCASE(EMR_POLYGON); EMRCASE(EMR_POLYLINE); + EMRCASE(EMR_POLYBEZIERTO); + EMRCASE(EMR_POLYLINETO); + EMRCASE(EMR_POLYPOLYLINE); + EMRCASE(EMR_POLYPOLYGON); EMRCASE(EMR_SETWINDOWEXTEX); EMRCASE(EMR_SETWINDOWORGEX); EMRCASE(EMR_SETVIEWPORTEXTEX); + EMRCASE(EMR_SETVIEWPORTORGEX); + EMRCASE(EMR_SETBRUSHORGEX); EMRCASE(EMR_EOF); + EMRCASE(EMR_SETPIXELV); + EMRCASE(EMR_SETMAPPERFLAGS); EMRCASE(EMR_SETMAPMODE); + EMRCASE(EMR_SETBKMODE); EMRCASE(EMR_SETPOLYFILLMODE); EMRCASE(EMR_SETROP2); + EMRCASE(EMR_SETSTRETCHBLTMODE); + EMRCASE(EMR_SETTEXTALIGN); + EMRCASE(EMR_SETCOLORADJUSTMENT); + EMRCASE(EMR_SETTEXTCOLOR); + EMRCASE(EMR_SETBKCOLOR); + EMRCASE(EMR_OFFSETCLIPRGN); + EMRCASE(EMR_MOVETOEX); + EMRCASE(EMR_SETMETARGN); + EMRCASE(EMR_EXCLUDECLIPRECT); + EMRCASE(EMR_INTERSECTCLIPRECT); + EMRCASE(EMR_SCALEVIEWPORTEXTEX); EMRCASE(EMR_SCALEWINDOWEXTEX); EMRCASE(EMR_SAVEDC); + EMRCASE(EMR_RESTOREDC); + EMRCASE(EMR_SETWORLDTRANSFORM); + EMRCASE(EMR_MODIFYWORLDTRANSFORM); EMRCASE(EMR_SELECTOBJECT); EMRCASE(EMR_CREATEPEN); EMRCASE(EMR_CREATEBRUSHINDIRECT); EMRCASE(EMR_DELETEOBJECT); + EMRCASE(EMR_ANGLEARC); + EMRCASE(EMR_ELLIPSE); EMRCASE(EMR_RECTANGLE); + EMRCASE(EMR_ROUNDRECT); + EMRCASE(EMR_ARC); + EMRCASE(EMR_CHORD); + EMRCASE(EMR_PIE); EMRCASE(EMR_SELECTPALETTE); + EMRCASE(EMR_CREATEPALETTE); + EMRCASE(EMR_SETPALETTEENTRIES); + EMRCASE(EMR_RESIZEPALETTE); + EMRCASE(EMR_REALIZEPALETTE); + EMRCASE(EMR_EXTFLOODFILL); + EMRCASE(EMR_LINETO); + EMRCASE(EMR_ARCTO); + EMRCASE(EMR_POLYDRAW); + EMRCASE(EMR_SETARCDIRECTION); + EMRCASE(EMR_SETMITERLIMIT); + EMRCASE(EMR_BEGINPATH); + EMRCASE(EMR_ENDPATH); + EMRCASE(EMR_CLOSEFIGURE); + EMRCASE(EMR_FILLPATH); + EMRCASE(EMR_STROKEANDFILLPATH); + EMRCASE(EMR_STROKEPATH); + EMRCASE(EMR_FLATTENPATH); + EMRCASE(EMR_WIDENPATH); + EMRCASE(EMR_SELECTCLIPPATH); + EMRCASE(EMR_ABORTPATH); EMRCASE(EMR_GDICOMMENT); + EMRCASE(EMR_FILLRGN); + EMRCASE(EMR_FRAMERGN); + EMRCASE(EMR_INVERTRGN); + EMRCASE(EMR_PAINTRGN); EMRCASE(EMR_EXTSELECTCLIPRGN); + EMRCASE(EMR_BITBLT); + EMRCASE(EMR_STRETCHBLT); + EMRCASE(EMR_MASKBLT); + EMRCASE(EMR_PLGBLT); + EMRCASE(EMR_SETDIBITSTODEVICE); + EMRCASE(EMR_STRETCHDIBITS); EMRCASE(EMR_EXTCREATEFONTINDIRECTW); + EMRCASE(EMR_EXTTEXTOUTA); EMRCASE(EMR_EXTTEXTOUTW); + EMRCASE(EMR_POLYBEZIER16); EMRCASE(EMR_POLYGON16); EMRCASE(EMR_POLYLINE16); + EMRCASE(EMR_POLYBEZIERTO16); + EMRCASE(EMR_POLYLINETO16); + EMRCASE(EMR_POLYPOLYLINE16); + EMRCASE(EMR_POLYPOLYGON16); + EMRCASE(EMR_POLYDRAW16); + EMRCASE(EMR_CREATEMONOBRUSH); + EMRCASE(EMR_CREATEDIBPATTERNBRUSHPT); + EMRCASE(EMR_EXTCREATEPEN); + EMRCASE(EMR_POLYTEXTOUTA); + EMRCASE(EMR_POLYTEXTOUTW); + EMRCASE(EMR_SETICMMODE); + EMRCASE(EMR_CREATECOLORSPACE); + EMRCASE(EMR_SETCOLORSPACE); + EMRCASE(EMR_DELETECOLORSPACE); + EMRCASE(EMR_GLSRECORD); + EMRCASE(EMR_GLSBOUNDEDRECORD); + EMRCASE(EMR_PIXELFORMAT); + EMRCASE(EMR_DRAWESCAPE); + EMRCASE(EMR_EXTESCAPE); + EMRCASE(EMR_STARTDOC); + EMRCASE(EMR_SMALLTEXTOUT); + EMRCASE(EMR_FORCEUFIMAPPING); + EMRCASE(EMR_NAMEDESCAPE); + EMRCASE(EMR_COLORCORRECTPALETTE); + EMRCASE(EMR_SETICMPROFILEA); + EMRCASE(EMR_SETICMPROFILEW); + EMRCASE(EMR_ALPHABLEND); + EMRCASE(EMR_SETLAYOUT); + EMRCASE(EMR_TRANSPARENTBLT); + EMRCASE(EMR_RESERVED_117); + EMRCASE(EMR_GRADIENTFILL); + EMRCASE(EMR_SETLINKEDUFI); + EMRCASE(EMR_SETTEXTJUSTIFICATION); + EMRCASE(EMR_COLORMATCHTOTARGETW); + EMRCASE(EMR_CREATECOLORSPACEW); default: - printf("%08x %08x\n",type,length); + printf("%u %08x\n", type, length); break; }
1
0
0
0
Dmitry Timoshkov : winex11.drv: Map zero-sized windows but don' t add WM decoration to them.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 15c0bcb3d8eff7c38def24b58633bb1d6116d8c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15c0bcb3d8eff7c38def24b58…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Apr 16 16:50:29 2008 +0900 winex11.drv: Map zero-sized windows but don't add WM decoration to them. --- dlls/winex11.drv/window.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ab63f3b..e0e8ea1 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -113,9 +113,6 @@ BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) */ BOOL X11DRV_is_window_rect_mapped( const RECT *rect ) { - /* don't map if rect is empty */ - if (IsRectEmpty( rect )) return FALSE; - /* don't map if rect is off-screen */ if (rect->left >= virtual_screen_rect.right || rect->top >= virtual_screen_rect.bottom || @@ -144,11 +141,14 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl /*********************************************************************** * get_mwm_decorations */ -static unsigned long get_mwm_decorations( DWORD style, DWORD ex_style ) +static unsigned long get_mwm_decorations( struct x11drv_win_data *data, + DWORD style, DWORD ex_style ) { unsigned long ret = 0; - if (!decorated_mode) return ret; + if (!decorated_mode) return 0; + + if (IsRectEmpty( &data->window_rect )) return 0; if (ex_style & WS_EX_TOOLWINDOW) return 0; @@ -180,7 +180,7 @@ static void get_x11_rect_offset( struct x11drv_win_data *data, RECT *rect ) style = GetWindowLongW( data->hwnd, GWL_STYLE ); ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); - decor = get_mwm_decorations( style, ex_style ); + decor = get_mwm_decorations( data, style, ex_style ); if (decor & MWM_DECOR_TITLE) style_mask |= WS_CAPTION; if (decor & MWM_DECOR_BORDER) @@ -876,7 +876,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - mwm_hints.decorations = get_mwm_decorations( style, ex_style ); + mwm_hints.decorations = get_mwm_decorations( data, style, ex_style ); mwm_hints.functions = MWM_FUNC_MOVE; if (is_window_resizable( data, style )) mwm_hints.functions |= MWM_FUNC_RESIZE; if (style & WS_MINIMIZEBOX) mwm_hints.functions |= MWM_FUNC_MINIMIZE;
1
0
0
0
Hin-Tak Leung : hhctrl.ocx: Look up in chm if url doesn't contain "://".
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 8988ab8f8d165b511c38395676c9fde88218b3ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8988ab8f8d165b511c3839567…
Author: Hin-Tak Leung <hintak_leung(a)yahoo.co.uk> Date: Mon Apr 14 20:17:27 2008 +0000 hhctrl.ocx: Look up in chm if url doesn't contain "://". --- dlls/hhctrl.ocx/help.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 900cfd9..a2081ce 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -89,9 +89,15 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl) BOOL ret; HRESULT hres; - hres = navigate_url(info, surl); - if(SUCCEEDED(hres)) - return TRUE; + static const WCHAR url_indicator[] = {':', '/', '/'}; + + TRACE("%s\n", debugstr_w(surl)); + + if (strstrW(surl, url_indicator)) { + hres = navigate_url(info, surl); + if(SUCCEEDED(hres)) + return TRUE; + } /* look up in chm if it doesn't look like a full url */ SetChmPath(&chm_path, info->pCHMInfo->szFile, surl); ret = NavigateToChm(info, chm_path.chm_file, chm_path.chm_index);
1
0
0
0
Hin-Tak Leung : hhctrl.ocx: Return help window handle to caller.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 76299b37ea61c23faa429c1489ba2952a5aa86ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76299b37ea61c23faa429c148…
Author: Hin-Tak Leung <htl10(a)users.sourceforge.net> Date: Wed Apr 16 01:03:49 2008 +0000 hhctrl.ocx: Return help window handle to caller. --- dlls/hhctrl.ocx/hhctrl.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 472b7cf..c0054de 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -132,8 +132,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat if(!res) ReleaseHelpViewer(info); } - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_HELP_CONTEXT: { HHInfo *info; @@ -149,8 +148,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat NavigateToUrl(info, url); heap_free(url); - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_PRETRANSLATEMESSAGE: { static BOOL warned = FALSE;
1
0
0
0
Vincent Povirk : tools: Modify wine.desktop to use start.exe /unix.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: 790715123a27ae215ad9474c4aaea7547c393da7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=790715123a27ae215ad9474c4…
Author: Vincent Povirk <madewokherd+d41d(a)gmail.com> Date: Sat Apr 12 20:31:00 2008 -0400 tools: Modify wine.desktop to use start.exe /unix. --- tools/wine.desktop | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/wine.desktop b/tools/wine.desktop index a499530..2be9b53 100644 --- a/tools/wine.desktop +++ b/tools/wine.desktop @@ -7,6 +7,6 @@ Name[nl]=Wine Windows-emulator Name[sv]=Windows-emulatorn Wine Name[ru]=Wine Эмулятор Windows Name[fr]=Émulateur Windows Wine -Exec=wine %f +Exec=wine start /unix %f MimeType=application/x-ms-dos-executable;application/x-msdos-program;application/x-msdownload;application/exe;application/x-exe;application/dos-exe;vms/exe;application/x-winexe;application/msdos-windows;application/x-zip-compressed;application/x-executable; NoDisplay=true
1
0
0
0
Vincent Povirk : start.exe: Add /Unix switch for native file managers.
by Alexandre Julliard
17 Apr '08
17 Apr '08
Module: wine Branch: master Commit: fc29e334f6dcaf566bc17c5c5514929a395686f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc29e334f6dcaf566bc17c5c5…
Author: Vincent Povirk <madewokherd+d41d(a)gmail.com> Date: Sat Apr 12 20:30:42 2008 -0400 start.exe: Add /Unix switch for native file managers. --- programs/start/En.rc | 5 ++- programs/start/resources.h | 1 + programs/start/start.c | 97 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 101 insertions(+), 2 deletions(-) diff --git a/programs/start/En.rc b/programs/start/En.rc index 3817a59..212046c 100644 --- a/programs/start/En.rc +++ b/programs/start/En.rc @@ -33,6 +33,7 @@ Options: \n\ /MAX[imized] Start the program maximized. \n\ /R[estored] Start the program normally (neither minimized nor maximized). \n\ /W[ait] Wait for started program to finish, then exit with its exit code. \n\ +/Unix Use a Unix filename and start the file like windows explorer. \n\ /L Show end-user license. \n\ \n\ start.exe version 0.2 Copyright (C) 2003, Dan Kegel \n\ @@ -59,5 +60,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. \n\ See the COPYING.LIB file for license information. \n\ " -STRING_EXECFAIL "Application could not be started, or no application associated with the specified file.\nShellExecuteEx failed" +STRING_EXECFAIL, "Application could not be started, or no application associated with the specified file.\nShellExecuteEx failed" + +STRING_UNIXFAIL "Could not translate the specified Unix filename to a DOS filename." } diff --git a/programs/start/resources.h b/programs/start/resources.h index fb4fff8..f5abd31 100644 --- a/programs/start/resources.h +++ b/programs/start/resources.h @@ -21,3 +21,4 @@ #define STRING_USAGE 101 #define STRING_LICENSE 102 #define STRING_EXECFAIL 103 +#define STRING_UNIXFAIL 104 diff --git a/programs/start/start.c b/programs/start/start.c index 58748c8..c7a4ba4 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -151,13 +151,37 @@ static WCHAR *build_args( int argc, WCHAR **argvW ) return ret; } +static WCHAR *get_parent_dir(WCHAR* path) +{ + WCHAR *last_slash; + WCHAR *result; + int len; + + last_slash = strrchrW( path, '\\' ); + if (last_slash == NULL) + len = 1; + else + len = last_slash - path + 1; + + result = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + CopyMemory(result, path, (len-1)*sizeof(WCHAR)); + result[len-1] = '\0'; + + return result; +} + int wmain (int argc, WCHAR *argv[]) { SHELLEXECUTEINFOW sei; WCHAR *args = NULL; int i; + int unix_mode = 0; + WCHAR *dos_filename = NULL; + WCHAR *parent_directory = NULL; + DWORD binary_type; static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 }; + static const WCHAR unixW[] = { 'u', 'n', 'i', 'x', 0 }; memset(&sei, 0, sizeof(sei)); sei.cbSize = sizeof(sei); @@ -178,6 +202,10 @@ int wmain (int argc, WCHAR *argv[]) if (argv[i][0] != '/') break; + /* Unix paths can start with / so we have to assume anything following /U is not a flag */ + if (unix_mode) + break; + /* Handle all options in this word */ for (ci=0; argv[i][ci]; ) { /* Skip slash */ @@ -198,6 +226,15 @@ int wmain (int argc, WCHAR *argv[]) case 'R': /* sei.nShow = SW_SHOWNORMAL; */ break; + case 'u': + case 'U': + if (strncmpiW(&argv[i][ci], unixW, 4) == 0) + unix_mode = 1; + else { + WINE_ERR("Option '%s' not recognized\n", wine_dbgstr_w( argv[i]+ci-1)); + usage(); + } + break; case 'w': case 'W': sei.fMask |= SEE_MASK_NOCLOSEPROCESS; @@ -220,10 +257,68 @@ int wmain (int argc, WCHAR *argv[]) args = build_args( argc - i, &argv[i] ); sei.lpParameters = args; - if (!ShellExecuteExW(&sei)) + if (unix_mode) { + LPWSTR (*wine_get_dos_file_name_ptr)(LPCSTR); + char* multibyte_unixpath; + int multibyte_unixpath_len; + + wine_get_dos_file_name_ptr = (void*)GetProcAddress(GetModuleHandle("KERNEL32"), "wine_get_dos_file_name"); + + if (!wine_get_dos_file_name_ptr) + fatal_string(STRING_UNIXFAIL); + + multibyte_unixpath_len = WideCharToMultiByte(CP_UNIXCP, 0, sei.lpFile, -1, NULL, 0, NULL, NULL); + multibyte_unixpath = HeapAlloc(GetProcessHeap(), 0, multibyte_unixpath_len); + + WideCharToMultiByte(CP_UNIXCP, 0, sei.lpFile, -1, multibyte_unixpath, multibyte_unixpath_len, NULL, NULL); + + dos_filename = wine_get_dos_file_name_ptr(multibyte_unixpath); + + HeapFree(GetProcessHeap(), 0, multibyte_unixpath); + + if (!dos_filename) + fatal_string(STRING_UNIXFAIL); + + sei.lpFile = dos_filename; + sei.lpDirectory = parent_directory = get_parent_dir(dos_filename); + + if (GetBinaryTypeW(sei.lpFile, &binary_type)) { + WCHAR *commandline; + STARTUPINFOW startup_info; + PROCESS_INFORMATION process_information; + static WCHAR commandlineformat[] = {'"','%','s','"','%','s',0}; + + /* explorer on windows always quotes the filename when running a binary on windows (see bug 5224) so we have to use CreateProcessW in this case */ + + commandline = HeapAlloc(GetProcessHeap(), 0, (strlenW(sei.lpFile)+3+strlenW(sei.lpParameters))*sizeof(WCHAR)); + sprintfW(commandline, commandlineformat, sei.lpFile, sei.lpParameters); + + ZeroMemory(&startup_info, sizeof(startup_info)); + startup_info.cb = sizeof(startup_info); + + if (!CreateProcessW( + NULL, /* lpApplicationName */ + commandline, /* lpCommandLine */ + NULL, /* lpProcessAttributes */ + NULL, /* lpThreadAttributes */ + FALSE, /* bInheritHandles */ + CREATE_NEW_CONSOLE, /* dwCreationFlags */ + NULL, /* lpEnvironment */ + sei.lpDirectory, /* lpCurrentDirectory */ + &startup_info, /* lpStartupInfo */ + &process_information /* lpProcessInformation */ )) + { + fatal_string_error(STRING_EXECFAIL, GetLastError()); + } + sei.hProcess = process_information.hProcess; + } + } + else if (!ShellExecuteExW(&sei)) fatal_string_error(STRING_EXECFAIL, GetLastError()); HeapFree( GetProcessHeap(), 0, args ); + HeapFree( GetProcessHeap(), 0, dos_filename ); + HeapFree( GetProcessHeap(), 0, parent_directory ); if (sei.fMask & SEE_MASK_NOCLOSEPROCESS) { DWORD exitcode;
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
52
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
Results per page:
10
25
50
100
200