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
September 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
828 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Store the window display connection in the window structure.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: ba926faf919ac5b069363534755d366f868cd07b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba926faf919ac5b0693635347…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 21 16:29:24 2012 +0200 winex11: Store the window display connection in the window structure. --- dlls/winex11.drv/desktop.c | 7 +- dlls/winex11.drv/event.c | 5 +- dlls/winex11.drv/window.c | 177 +++++++++++++++++++++----------------------- dlls/winex11.drv/x11drv.h | 3 +- 4 files changed, 91 insertions(+), 101 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ba926faf919ac5b069363…
1
0
0
0
Alexandre Julliard : winex11: Add window data structure locking to the window region functions.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: 9ac774b88d8c5097f885e117a7b8cd914192a17e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ac774b88d8c5097f885e117a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 21 15:53:48 2012 +0200 winex11: Add window data structure locking to the window region functions. --- dlls/winex11.drv/window.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index abbdb98..5eab698 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2269,9 +2269,10 @@ int CDECL X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw ) { struct x11drv_win_data *data; - if ((data = X11DRV_get_win_data( hwnd ))) + if ((data = get_win_data( hwnd ))) { sync_window_region( thread_display(), data, hrgn ); + release_win_data( data ); } else if (X11DRV_get_whole_window( hwnd )) { @@ -2324,7 +2325,11 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) case WM_X11DRV_SET_WIN_FORMAT: return set_win_format( hwnd, (XID)wp ); case WM_X11DRV_SET_WIN_REGION: - if ((data = X11DRV_get_win_data( hwnd ))) sync_window_region( thread_display(), data, (HRGN)1 ); + if ((data = get_win_data( hwnd ))) + { + sync_window_region( thread_display(), data, (HRGN)1 ); + release_win_data( data ); + } return 0; case WM_X11DRV_RESIZE_DESKTOP: X11DRV_resize_desktop( LOWORD(lp), HIWORD(lp) );
1
0
0
0
Alexandre Julliard : winex11: Add window data structure locking to the X window creation paths.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: ffa7af171a991df9b6a0cb6bb523bf73c9c9bb24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffa7af171a991df9b6a0cb6bb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 21 12:45:35 2012 +0200 winex11: Add window data structure locking to the X window creation paths. --- dlls/winex11.drv/window.c | 93 +++++++++++++++++++++----------------------- 1 files changed, 44 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ffa7af171a991df9b6a0c…
1
0
0
0
Alexandre Julliard : winex11: Separate fetching the window icon bits and setting the WM hints.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: 16410ead78e35b74c95f9b5c0fdbba0c9a066271 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16410ead78e35b74c95f9b5c0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 21 11:52:29 2012 +0200 winex11: Separate fetching the window icon bits and setting the WM hints. --- dlls/winex11.drv/window.c | 109 ++++++++++++++++++++++----------------------- dlls/winex11.drv/x11drv.h | 7 ++- 2 files changed, 57 insertions(+), 59 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index d4f3f9b..d07be48 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -527,7 +527,7 @@ failed: /*********************************************************************** * create_icon_pixmaps */ -static BOOL create_icon_pixmaps( HDC hdc, const ICONINFO *icon, struct x11drv_win_data *data ) +static BOOL create_icon_pixmaps( HDC hdc, const ICONINFO *icon, Pixmap *icon_ret, Pixmap *mask_ret ) { char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; BITMAPINFO *info = (BITMAPINFO *)buffer; @@ -573,8 +573,8 @@ static BOOL create_icon_pixmaps( HDC hdc, const ICONINFO *icon, struct x11drv_wi bits.ptr = NULL; if (!mask_pixmap) goto failed; - data->icon_pixmap = color_pixmap; - data->icon_mask = mask_pixmap; + *icon_ret = color_pixmap; + *mask_ret = mask_pixmap; return TRUE; failed: @@ -586,18 +586,16 @@ failed: /*********************************************************************** - * set_icon_hints - * - * Set the icon wm hints + * fetch_icon_data */ -static void set_icon_hints( HWND hwnd, HICON icon_big, HICON icon_small ) +static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small ) { - Display *display = thread_display(); struct x11drv_win_data *data; ICONINFO ii, ii_small; HDC hDC; unsigned int size; unsigned long *bits; + Pixmap icon_pixmap, mask_pixmap; if (!icon_big) { @@ -611,13 +609,6 @@ static void set_icon_hints( HWND hwnd, HICON icon_big, HICON icon_small ) if (!icon_small) icon_small = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM ); } - if (!(data = X11DRV_get_win_data( hwnd ))) return; - - if (data->icon_pixmap) XFreePixmap( gdi_display, data->icon_pixmap ); - if (data->icon_mask) XFreePixmap( gdi_display, data->icon_mask ); - data->icon_pixmap = data->icon_mask = 0; - data->wm_hints->flags &= ~(IconPixmapHint | IconMaskHint); - if (!GetIconInfo(icon_big, &ii)) return; hDC = CreateCompatibleDC(0); @@ -642,22 +633,30 @@ static void set_icon_hints( HWND hwnd, HICON icon_big, HICON icon_small ) DeleteObject( ii_small.hbmColor ); DeleteObject( ii_small.hbmMask ); } - if (bits) - XChangeProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON), - XA_CARDINAL, 32, PropModeReplace, (unsigned char *)bits, size ); - else - XDeleteProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON) ); - HeapFree( GetProcessHeap(), 0, bits ); - if (create_icon_pixmaps( hDC, &ii, data )) - { - data->wm_hints->icon_pixmap = data->icon_pixmap; - data->wm_hints->icon_mask = data->icon_mask; - data->wm_hints->flags |= IconPixmapHint | IconMaskHint; - } + if (!create_icon_pixmaps( hDC, &ii, &icon_pixmap, &mask_pixmap )) icon_pixmap = mask_pixmap = 0; + DeleteObject( ii.hbmColor ); DeleteObject( ii.hbmMask ); DeleteDC(hDC); + + if ((data = get_win_data( hwnd ))) + { + if (data->icon_pixmap) XFreePixmap( gdi_display, data->icon_pixmap ); + if (data->icon_mask) XFreePixmap( gdi_display, data->icon_mask ); + HeapFree( GetProcessHeap(), 0, data->icon_bits ); + data->icon_pixmap = icon_pixmap; + data->icon_mask = mask_pixmap; + data->icon_bits = bits; + data->icon_size = size; + release_win_data( data ); + } + else + { + if (icon_pixmap) XFreePixmap( gdi_display, icon_pixmap ); + if (mask_pixmap) XFreePixmap( gdi_display, mask_pixmap ); + HeapFree( GetProcessHeap(), 0, bits ); + } } @@ -746,6 +745,7 @@ static void set_style_hints( Display *display, struct x11drv_win_data *data, DWO Window group_leader = data->whole_window; HWND owner = GetWindow( data->hwnd, GW_OWNER ); Window owner_win = X11DRV_get_whole_window( owner ); + XWMHints *wm_hints; Atom window_type; if (owner_win) @@ -766,15 +766,29 @@ static void set_style_hints( Display *display, struct x11drv_win_data *data, DWO XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE), XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); - /* wm hints */ - if (data->wm_hints) + if ((wm_hints = XAllocWMHints())) { - data->wm_hints->flags |= InputHint | StateHint | WindowGroupHint; - data->wm_hints->input = !use_take_focus && !(style & WS_DISABLED); - data->wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState; - data->wm_hints->window_group = group_leader; - XSetWMHints( display, data->whole_window, data->wm_hints ); + wm_hints->flags = InputHint | StateHint | WindowGroupHint; + wm_hints->input = !use_take_focus && !(style & WS_DISABLED); + wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState; + wm_hints->window_group = group_leader; + if (data->icon_pixmap) + { + wm_hints->icon_pixmap = data->icon_pixmap; + wm_hints->icon_mask = data->icon_mask; + wm_hints->flags |= IconPixmapHint | IconMaskHint; + } + XSetWMHints( display, data->whole_window, wm_hints ); + XFree( wm_hints ); } + + if (data->icon_bits) + XChangeProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON), + XA_CARDINAL, 32, PropModeReplace, + (unsigned char *)data->icon_bits, data->icon_size ); + else + XDeleteProperty( display, data->whole_window, x11drv_atom(_NET_WM_ICON) ); + } @@ -858,13 +872,6 @@ static void set_initial_wm_hints( HWND hwnd ) if (user_time_window) XChangeProperty( display, data->whole_window, x11drv_atom(_NET_WM_USER_TIME_WINDOW), XA_WINDOW, 32, PropModeReplace, (unsigned char *)&user_time_window, 1 ); - - data->wm_hints = XAllocWMHints(); - if (data->wm_hints) - { - data->wm_hints->flags = 0; - set_icon_hints( hwnd, 0, 0 ); - } } @@ -1378,6 +1385,7 @@ static Window create_whole_window( HWND hwnd ) if (!data->whole_window) goto done; set_initial_wm_hints( hwnd ); + fetch_icon_data( hwnd, 0, 0 ); set_wm_hints( hwnd ); XSaveContext( display, data->whole_window, winContext, (char *)data->hwnd ); @@ -1444,8 +1452,6 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data } /* Outlook stops processing messages after destroying a dialog, so we need an explicit flush */ XFlush( display ); - XFree( data->wm_hints ); - data->wm_hints = NULL; if (data->surface) window_surface_release( data->surface ); data->surface = NULL; RemovePropA( data->hwnd, whole_window_prop ); @@ -1507,6 +1513,7 @@ void CDECL X11DRV_DestroyWindow( HWND hwnd ) if (thread_data->last_xic_hwnd == hwnd) thread_data->last_xic_hwnd = 0; if (data->icon_pixmap) XFreePixmap( gdi_display, data->icon_pixmap ); if (data->icon_mask) XFreePixmap( gdi_display, data->icon_mask ); + HeapFree( GetProcessHeap(), 0, data->icon_bits ); XDeleteContext( gdi_display, (XID)hwnd, win_data_context ); release_win_data( data ); HeapFree( GetProcessHeap(), 0, data ); @@ -2245,26 +2252,16 @@ UINT CDECL X11DRV_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp ) * hIcon or hIconSm has changed (or is being initialised for the * first time). Complete the X11 driver-specific initialisation * and set the window hints. - * - * This is not entirely correct, may need to create - * an icon window and set the pixmap as a background */ void CDECL X11DRV_SetWindowIcon( HWND hwnd, UINT type, HICON icon ) { - Display *display = thread_display(); struct x11drv_win_data *data; - if (!(data = X11DRV_get_win_data( hwnd ))) return; if (!data->whole_window) return; - if (!data->managed) return; - - if (data->wm_hints) - { - if (type == ICON_BIG) set_icon_hints( hwnd, icon, 0 ); - else set_icon_hints( hwnd, 0, icon ); - XSetWMHints( display, data->whole_window, data->wm_hints ); - } + if (type == ICON_BIG) fetch_icon_data( hwnd, icon, 0 ); + else fetch_icon_data( hwnd, 0, icon ); + set_wm_hints( hwnd ); } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 28cbe6a..4f355ad 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -538,7 +538,6 @@ struct x11drv_win_data RECT whole_rect; /* X window rectangle for the whole window relative to parent */ RECT client_rect; /* client area relative to parent */ XIC xic; /* X input context */ - XWMHints *wm_hints; /* window manager hints */ BOOL managed : 1; /* is window managed? */ BOOL mapped : 1; /* is window mapped? (in either normal or iconic state) */ BOOL iconic : 1; /* is window in iconic state? */ @@ -549,8 +548,10 @@ struct x11drv_win_data Window embedder; /* window id of embedder */ unsigned long configure_serial; /* serial number of last configure request */ struct window_surface *surface; - Pixmap icon_pixmap; - Pixmap icon_mask; + Pixmap icon_pixmap; + Pixmap icon_mask; + unsigned long *icon_bits; + unsigned int icon_size; }; extern struct x11drv_win_data *get_win_data( HWND hwnd ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : winex11: Move the support for making the owner window managed to a separate function .
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: d82082c14ffe0aad6a9abd82ebaf425104b7952f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d82082c14ffe0aad6a9abd82e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 21 11:31:28 2012 +0200 winex11: Move the support for making the owner window managed to a separate function. --- dlls/winex11.drv/window.c | 111 +++++++++++++++++++++++++------------------- 1 files changed, 63 insertions(+), 48 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 94edb81..d4f3f9b 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -160,15 +160,21 @@ struct has_popup_result BOOL found; }; +static BOOL is_managed( HWND hwnd ) +{ + struct x11drv_win_data *data = get_win_data( hwnd ); + BOOL ret = data && data->managed; + release_win_data( data ); + return ret; +} + static BOOL CALLBACK has_managed_popup( HWND hwnd, LPARAM lparam ) { struct has_popup_result *result = (struct has_popup_result *)lparam; - struct x11drv_win_data *data; if (hwnd == result->hwnd) return FALSE; /* popups are always above owner */ - if (!(data = X11DRV_get_win_data( hwnd ))) return TRUE; if (GetWindow( hwnd, GW_OWNER ) != result->hwnd) return TRUE; - result->found = data->managed; + result->found = is_managed( hwnd ); return !result->found; } @@ -733,6 +739,46 @@ static void set_mwm_hints( Display *display, struct x11drv_win_data *data, DWORD /*********************************************************************** + * set_style_hints + */ +static void set_style_hints( Display *display, struct x11drv_win_data *data, DWORD style, DWORD ex_style ) +{ + Window group_leader = data->whole_window; + HWND owner = GetWindow( data->hwnd, GW_OWNER ); + Window owner_win = X11DRV_get_whole_window( owner ); + Atom window_type; + + if (owner_win) + { + XSetTransientForHint( display, data->whole_window, owner_win ); + group_leader = owner_win; + } + + /* Only use dialog type for owned popups. Metacity allows making fullscreen + * only normal windows, and doesn't handle correctly TRANSIENT_FOR hint for + * dialogs owned by fullscreen windows. + */ + if (((style & WS_POPUP) || (ex_style & WS_EX_DLGMODALFRAME)) && owner) + window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG); + else + window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL); + + XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE), + XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); + + /* wm hints */ + if (data->wm_hints) + { + data->wm_hints->flags |= InputHint | StateHint | WindowGroupHint; + data->wm_hints->input = !use_take_focus && !(style & WS_DISABLED); + data->wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState; + data->wm_hints->window_group = group_leader; + XSetWMHints( display, data->whole_window, data->wm_hints ); + } +} + + +/*********************************************************************** * get_process_name * * get the name of the current process for setting class hints @@ -823,83 +869,50 @@ static void set_initial_wm_hints( HWND hwnd ) /*********************************************************************** - * get_owner_whole_window + * make_owner_managed * - * Retrieve an owner's window, creating it if necessary. + * If the window is managed, make sure its owner window is too. */ -static Window get_owner_whole_window( HWND owner, BOOL force_managed ) +static void make_owner_managed( HWND hwnd ) { - struct x11drv_win_data *data; - - if (!owner) return 0; + HWND owner; - if (!(data = X11DRV_get_win_data( owner ))) return (Window)GetPropA( owner, whole_window_prop ); + if (!(owner = GetWindow( hwnd, GW_OWNER ))) return; + if (is_managed( owner )) return; + if (!is_managed( hwnd )) return; - if (!data->managed && force_managed) /* make it managed */ - { - SetWindowPos( owner, 0, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | - SWP_NOREDRAW | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_STATECHANGED ); - } - return data->whole_window; + SetWindowPos( owner, 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | + SWP_NOREDRAW | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_STATECHANGED ); } /*********************************************************************** * set_wm_hints * - * Set the window manager hints for a newly-created window + * Set all the window manager hints for a window. */ static void set_wm_hints( HWND hwnd ) { Display *display = thread_display(); struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); - Window group_leader = data->whole_window; - Window owner_win = 0; - Atom window_type; DWORD style, ex_style; - HWND owner; if (hwnd == GetDesktopWindow()) { /* force some styles for the desktop to get the correct decorations */ style = WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; ex_style = WS_EX_APPWINDOW; - owner = 0; } else { style = GetWindowLongW( hwnd, GWL_STYLE ); ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); - owner = GetWindow( hwnd, GW_OWNER ); - if ((owner_win = get_owner_whole_window( owner, data->managed ))) group_leader = owner_win; } - if (owner_win) XSetTransientForHint( display, data->whole_window, owner_win ); - - /* size hints */ set_size_hints( display, data, style ); set_mwm_hints( display, data, style, ex_style ); - - /* Only use dialog type for owned popups. Metacity allows making fullscreen - * only normal windows, and doesn't handle correctly TRANSIENT_FOR hint for - * dialogs owned by fullscreen windows. - */ - if (((style & WS_POPUP) || (ex_style & WS_EX_DLGMODALFRAME)) && owner) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG); - else window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL); - - XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE), - XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); - - /* wm hints */ - if (data->wm_hints) - { - data->wm_hints->flags |= InputHint | StateHint | WindowGroupHint; - data->wm_hints->input = !use_take_focus && !(style & WS_DISABLED); - data->wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState; - data->wm_hints->window_group = group_leader; - XSetWMHints( display, data->whole_window, data->wm_hints ); - } + set_style_hints( display, data, style, ex_style ); } @@ -2157,6 +2170,8 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags if ((new_style & WS_VISIBLE) && ((new_style & WS_MINIMIZE) || is_window_rect_mapped( rectWindow ))) { + if (!data->mapped) make_owner_managed( hwnd ); + if (!data->mapped || (swp_flags & (SWP_FRAMECHANGED|SWP_STATECHANGED))) set_wm_hints( hwnd ); if (!data->mapped)
1
0
0
0
Charles Davis : loader: On Mac OS with Clang, don' t use external symbols for the DOS and shared heap segments.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: b51c2ba9f74c18268eedf6597b9c4e914abacd07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b51c2ba9f74c18268eedf6597…
Author: Charles Davis <cdavis5x(a)gmail.com> Date: Fri Sep 21 01:51:34 2012 -0600 loader: On Mac OS with Clang, don't use external symbols for the DOS and shared heap segments. --- loader/main.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/loader/main.c b/loader/main.c index edbf4f7..74a8eb8 100644 --- a/loader/main.c +++ b/loader/main.c @@ -43,9 +43,16 @@ #ifdef __APPLE__ +#ifndef __clang__ __asm__(".zerofill WINE_DOS, WINE_DOS, ___wine_dos, 0x40000000"); __asm__(".zerofill WINE_SHAREDHEAP, WINE_SHAREDHEAP, ___wine_shared_heap, 0x03000000"); extern char __wine_dos[0x40000000], __wine_shared_heap[0x03000000]; +#else +__asm__(".zerofill WINE_DOS, WINE_DOS"); +__asm__(".zerofill WINE_SHAREDHEAP, WINE_SHAREDHEAP"); +static char __wine_dos[0x40000000] __attribute__((section("WINE_DOS, WINE_DOS"))); +static char __wine_shared_heap[0x03000000] __attribute__((section("WINE_SHAREDHEAP, WINE_SHAREDHEAP"))); +#endif static const struct wine_preload_info wine_main_preload_info[] = {
1
0
0
0
André Hentschel : iphlpapi: Improved GetTcpStatisticsEx stub.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: 07316882a55c14f6ab68a668f0e838611e2a85fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07316882a55c14f6ab68a668f…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Sep 20 23:57:33 2012 +0200 iphlpapi: Improved GetTcpStatisticsEx stub. --- dlls/iphlpapi/iphlpapi.spec | 2 +- dlls/iphlpapi/ipstats.c | 30 +++++++++++++++++++++++++++--- dlls/iphlpapi/tests/iphlpapi.c | 10 +++++++--- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec index 368159a..36ba13f 100644 --- a/dlls/iphlpapi/iphlpapi.spec +++ b/dlls/iphlpapi/iphlpapi.spec @@ -134,7 +134,7 @@ #@ stub GetSessionCompartmentId @ stdcall GetTcp6Table( ptr ptr long ) @ stdcall GetTcp6Table2( ptr ptr long ) -#@ stub GetTcpStatisticsEx +@ stdcall GetTcpStatisticsEx( ptr long ) @ stdcall GetTcpStatistics( ptr ) @ stub GetTcpStatsFromStack @ stdcall GetTcpTable( ptr ptr long ) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 79dac58..a56e753 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -975,24 +975,32 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats) } /****************************************************************** - * GetTcpStatistics (IPHLPAPI.@) + * GetTcpStatisticsEx (IPHLPAPI.@) * - * Get the TCP statistics for the local computer. + * Get the IPv4 and IPv6 TCP statistics for the local computer. * * PARAMS * stats [Out] buffer for TCP statistics + * family [In] specifies wether IPv4 or IPv6 statistics are returned * * RETURNS * Success: NO_ERROR * Failure: error code from winerror.h */ -DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats) +DWORD WINAPI GetTcpStatisticsEx(PMIB_TCPSTATS stats, DWORD family) { DWORD ret = ERROR_NOT_SUPPORTED; if (!stats) return ERROR_INVALID_PARAMETER; + if (family != WS_AF_INET && family != WS_AF_INET6) return ERROR_INVALID_PARAMETER; memset( stats, 0, sizeof(*stats) ); + if (family == WS_AF_INET6) + { + FIXME( "unimplemented for IPv6\n" ); + return ret; + } + #ifdef __linux__ { FILE *fp; @@ -1111,6 +1119,22 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats) return ret; } +/****************************************************************** + * GetTcpStatistics (IPHLPAPI.@) + * + * Get the TCP statistics for the local computer. + * + * PARAMS + * stats [Out] buffer for TCP statistics + * + * RETURNS + * Success: NO_ERROR + * Failure: error code from winerror.h + */ +DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats) +{ + return GetTcpStatisticsEx(stats, WS_AF_INET); +} /****************************************************************** * GetUdpStatistics (IPHLPAPI.@) diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index eb96189..26bf26e 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -659,7 +659,7 @@ static void testGetTcpStatisticsEx(void) if (!pGetTcpStatisticsEx) { - skip( "GetTcpStatisticsEx not available\n" ); + win_skip( "GetTcpStatisticsEx not available\n" ); return; } @@ -667,6 +667,10 @@ static void testGetTcpStatisticsEx(void) ok(apiReturn == ERROR_INVALID_PARAMETER, "GetTcpStatisticsEx(NULL, AF_INET); returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn); + apiReturn = pGetTcpStatisticsEx(&stats, AF_BAN); + ok(apiReturn == ERROR_INVALID_PARAMETER || apiReturn == ERROR_NOT_SUPPORTED, + "GetTcpStatisticsEx(&stats, AF_BAN) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn); + apiReturn = pGetTcpStatisticsEx(&stats, AF_INET); ok(apiReturn == NO_ERROR, "GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); if (apiReturn == NO_ERROR && winetest_debug > 1) @@ -690,8 +694,8 @@ static void testGetTcpStatisticsEx(void) } apiReturn = pGetTcpStatisticsEx(&stats, AF_INET6); - ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), - "GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); + todo_wine ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), + "GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); if (apiReturn == NO_ERROR && winetest_debug > 1) { trace( "TCP IPv6 Ex stats:\n" );
1
0
0
0
Dmitry Timoshkov : windowscodecs: Avoid unnecessary memory allocations.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: 6715b186f66b14e70a7c587311861fbc3cc887c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6715b186f66b14e70a7c58731…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Sep 21 09:42:37 2012 +0900 windowscodecs: Avoid unnecessary memory allocations. --- dlls/windowscodecs/gifformat.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 1dce11d..81bde20 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -413,10 +413,7 @@ static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD opti result[1].id.u.pwszVal = strdupAtoW("Data"); result[1].value.vt = VT_UI1|VT_VECTOR; result[1].value.u.caub.cElems = data_size; - result[1].value.u.caub.pElems = HeapAlloc(GetProcessHeap(), 0, data_size); - memcpy(result[1].value.u.caub.pElems, data, data_size); - - HeapFree(GetProcessHeap(), 0, data); + result[1].value.u.caub.pElems = data; *items = result; *count = 2; @@ -449,7 +446,7 @@ static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWO ULONG bytesread, data_size; MetadataItem *result; BYTE subblock_size; - BYTE *data; + char *data; *items = NULL; *count = 0; @@ -474,10 +471,10 @@ static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWO if (!subblock_size) break; if (!data) - data = HeapAlloc(GetProcessHeap(), 0, subblock_size); + data = HeapAlloc(GetProcessHeap(), 0, subblock_size + 1); else { - BYTE *new_data = HeapReAlloc(GetProcessHeap(), 0, data, data_size + subblock_size); + char *new_data = HeapReAlloc(GetProcessHeap(), 0, data, data_size + subblock_size + 1); if (!new_data) { HeapFree(GetProcessHeap(), 0, data); @@ -494,6 +491,8 @@ static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWO data_size += subblock_size; } + data[data_size] = 0; + result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem)); if (!result) { @@ -508,11 +507,7 @@ static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWO result->id.vt = VT_LPWSTR; result->id.u.pwszVal = strdupAtoW("TextEntry"); result->value.vt = VT_LPSTR; - result->value.u.pszVal = HeapAlloc(GetProcessHeap(), 0, data_size + 1); - memcpy(result->value.u.pszVal, data, data_size); - result->value.u.pszVal[data_size] = 0; - - HeapFree(GetProcessHeap(), 0, data); + result->value.u.pszVal = data; *items = result; *count = 1;
1
0
0
0
Vincent Povirk : gdiplus: Implement LineCapRound in GdipWidenPath.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: 0b40c9cb4101fa0891df4b1e6baaba73aeffb1ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b40c9cb4101fa0891df4b1e6…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Sep 20 16:45:36 2012 -0500 gdiplus: Implement LineCapRound in GdipWidenPath. --- dlls/gdiplus/graphicspath.c | 47 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 8b3a132..47a864b 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1799,6 +1799,49 @@ static void widen_cap(const GpPointF *endpoint, const GpPointF *nextpoint, break; } + case LineCapRound: + { + REAL segment_dy = nextpoint->Y-endpoint->Y; + REAL segment_dx = nextpoint->X-endpoint->X; + REAL segment_length = sqrtf(segment_dy*segment_dy + segment_dx*segment_dx); + REAL distance = pen->width/2.0; + REAL dx, dy, dx2, dy2; + const REAL control_point_distance = 0.5522847498307935; /* 4/3 * (sqrt(2) - 1) */ + + if (add_first_points) + { + dx = -distance * segment_dx / segment_length; + dy = -distance * segment_dy / segment_length; + + dx2 = dx * control_point_distance; + dy2 = dy * control_point_distance; + + /* first 90-degree arc */ + *last_point = add_path_list_node(*last_point, endpoint->X + dy, + endpoint->Y - dx, PathPointTypeLine); + + *last_point = add_path_list_node(*last_point, endpoint->X + dy + dx2, + endpoint->Y - dx + dy2, PathPointTypeBezier); + + *last_point = add_path_list_node(*last_point, endpoint->X + dx + dy2, + endpoint->Y + dy - dx2, PathPointTypeBezier); + + /* midpoint */ + *last_point = add_path_list_node(*last_point, endpoint->X + dx, + endpoint->Y + dy, PathPointTypeBezier); + + /* second 90-degree arc */ + *last_point = add_path_list_node(*last_point, endpoint->X + dx - dy2, + endpoint->Y + dy + dx2, PathPointTypeBezier); + + *last_point = add_path_list_node(*last_point, endpoint->X - dy + dx2, + endpoint->Y + dx + dy2, PathPointTypeBezier); + + *last_point = add_path_list_node(*last_point, endpoint->X - dy, + endpoint->Y + dx, PathPointTypeBezier); + } + break; + } } } @@ -1905,10 +1948,10 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, { last_point = points; - if (pen->endcap > LineCapSquare) + if (pen->endcap > LineCapRound) FIXME("unimplemented end cap %x\n", pen->endcap); - if (pen->startcap > LineCapSquare) + if (pen->startcap > LineCapRound) FIXME("unimplemented start cap %x\n", pen->startcap); if (pen->dashcap != DashCapFlat)
1
0
0
0
Vincent Povirk : gdiplus: Properly set the first point to start when widening open figures.
by Alexandre Julliard
21 Sep '12
21 Sep '12
Module: wine Branch: master Commit: 8871af7ea563725fb92b75ec88a1fa946dccb574 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8871af7ea563725fb92b75ec8…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Sep 20 16:44:47 2012 -0500 gdiplus: Properly set the first point to start when widening open figures. --- dlls/gdiplus/graphicspath.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 0515175..8b3a132 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1806,15 +1806,16 @@ static void widen_open_figure(GpPath *path, GpPen *pen, int start, int end, path_list_node_t **last_point) { int i; + path_list_node_t *prev_point; if (end <= start) return; + prev_point = *last_point; + widen_cap(&path->pathdata.Points[start], &path->pathdata.Points[start+1], pen, pen->startcap, pen->customstart, FALSE, TRUE, last_point); - (*last_point)->type = PathPointTypeStart; - for (i=start+1; i<end; i++) widen_joint(&path->pathdata.Points[i-1], &path->pathdata.Points[i], &path->pathdata.Points[i+1], pen, last_point); @@ -1829,6 +1830,7 @@ static void widen_open_figure(GpPath *path, GpPen *pen, int start, int end, widen_cap(&path->pathdata.Points[start], &path->pathdata.Points[start+1], pen, pen->startcap, pen->customstart, TRUE, FALSE, last_point); + prev_point->next->type = PathPointTypeStart; (*last_point)->type |= PathPointTypeCloseSubpath; }
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
83
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
Results per page:
10
25
50
100
200