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
May 2009
----- 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
793 discussions
Start a n
N
ew thread
Paul Vriens : comdlg32: Improve the Dutch find and replace dialogs.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: a478d765d3d40b6455d30d84af39bde08d03d6c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a478d765d3d40b6455d30d84a…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue May 12 10:17:14 2009 +0200 comdlg32: Improve the Dutch find and replace dialogs. --- dlls/comdlg32/cdlg_Nl.rc | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/comdlg32/cdlg_Nl.rc b/dlls/comdlg32/cdlg_Nl.rc index baeb880..6910405 100644 --- a/dlls/comdlg32/cdlg_Nl.rc +++ b/dlls/comdlg32/cdlg_Nl.rc @@ -182,7 +182,7 @@ FONT 8, "MS Shell Dlg" } -FINDDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62 +FINDDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 246, 72 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Tekst zoeken" FONT 8, "MS Shell Dlg" @@ -190,18 +190,18 @@ FONT 8, "MS Shell Dlg" LTEXT "&Zoek naar:", -1, 4, 8, 42, 8 EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "Heel &woord", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Gelijke &hoofd-/kleine letters", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP - GROUPBOX "Zoekrichting", 1072, 107, 26, 68, 28 - CONTROL "&Omhoog", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12 - CONTROL "Om&laag", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12 - - DEFPUSHBUTTON "&Volgende zoeken", IDOK, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "Annuleren", IDCANCEL, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&Help", pshHelp , 182, 45, 50, 14, WS_GROUP | WS_TABSTOP + CHECKBOX "Gelijke &hoofd-/kleine letters", 1041, 4, 52, 100, 12, BS_AUTOCHECKBOX | WS_TABSTOP + GROUPBOX "Zoekrichting", 1072, 117, 26, 58, 38 + CONTROL "&Omhoog", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 121, 38, 40, 12 + CONTROL "Om&laag", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 121, 50, 40, 12 + + DEFPUSHBUTTON "&Volgende zoeken", IDOK, 182, 5, 60, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Annuleren", IDCANCEL, 182, 23, 60, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Help", pshHelp , 182, 45, 60, 14, WS_GROUP | WS_TABSTOP } -REPLACEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94 +REPLACEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 240, 94 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Tekst vervangen" FONT 8, "MS Shell Dlg" @@ -211,13 +211,13 @@ FONT 8, "MS Shell Dlg" LTEXT "Vervang &door:", -1, 4, 26, 48, 8 EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "Heel &woord", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Gelijke &hoofd-/kleine letters", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Gelijke &hoofd-/kleine letters", 1041, 5, 62, 100, 12, BS_AUTOCHECKBOX | WS_TABSTOP - DEFPUSHBUTTON "Volgende zoeken", IDOK, 174, 4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "Ve&rvangen", psh1 , 174, 21, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&Alles vervangen", psh2 , 174, 38, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "Annuleren", IDCANCEL, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&Help", pshHelp , 174, 75, 50, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "Volgende zoeken", IDOK, 174, 4, 60, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Ve&rvangen", psh1 , 174, 21, 60, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Alles vervangen", psh2 , 174, 38, 60, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuleren", IDCANCEL, 174, 55, 60, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Help", pshHelp , 174, 75, 60, 14, WS_GROUP | WS_TABSTOP } NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
1
0
0
0
Paul Vriens : notepad: Fix the Dutch translations.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: a225aaa8945c79d6305a856b2ebd58d5370cdd9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a225aaa8945c79d6305a856b2…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue May 12 10:11:47 2009 +0200 notepad: Fix the Dutch translations. --- programs/notepad/Nl.rc | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/programs/notepad/Nl.rc b/programs/notepad/Nl.rc index e2d9213..e4d1221 100644 --- a/programs/notepad/Nl.rc +++ b/programs/notepad/Nl.rc @@ -49,15 +49,16 @@ POPUP "Be&werken" { MENUITEM "&Lettertype instellen...", CMD_FONT } POPUP "&Zoeken" { - MENUITEM "&Zoeken...\tCtrl+Z", CMD_SEARCH - MENUITEM "&Volgende zoeken\tF3", CMD_SEARCH_NEXT + MENUITEM "&Zoeken...\tCtrl+Z", CMD_SEARCH + MENUITEM "V&olgende zoeken\tF3", CMD_SEARCH_NEXT + MENUITEM "&Vervangen...\tCtrl+H", CMD_REPLACE } POPUP "&Help" { MENUITEM "&Help-onderwerpen", CMD_HELP_CONTENTS MENUITEM "&Zoeken...", CMD_HELP_SEARCH MENUITEM "&Hulp bij Help", CMD_HELP_ON_HELP MENUITEM SEPARATOR - MENUITEM "&About Notepad", CMD_HELP_ABOUT_NOTEPAD + MENUITEM "&Over Notepad", CMD_HELP_ABOUT_NOTEPAD } }
1
0
0
0
Nikolay Sivov : comctl32/listview: A couple of tests for changing item attributes.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: bad1dda9ad1f3299e6f7d3b6f4d01bbfe7299d04 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bad1dda9ad1f3299e6f7d3b6f…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue May 12 01:16:12 2009 +0400 comctl32/listview: A couple of tests for changing item attributes. --- dlls/comctl32/tests/listview.c | 62 ++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/tests/msg.h | 3 +- 2 files changed, 64 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 5987e1e..43eb274 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -168,6 +168,18 @@ static const struct message forward_erasebkgnd_parent_seq[] = { { 0 } }; +static const struct message ownderdata_select_focus_parent_seq[] = { + { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, + { WM_NOTIFY, sent|id, 0, 0, LVN_GETDISPINFOA }, + { 0 } +}; + +static const struct message textcallback_set_again_parent_seq[] = { + { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, + { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, + { 0 } +}; + struct subclass_info { WNDPROC oldproc; @@ -184,6 +196,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP if (defwndproc_counter) msg.flags |= defwinproc; msg.wParam = wParam; msg.lParam = lParam; + if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code; /* log system messages, except for painting */ if (message < WM_USER && @@ -827,6 +840,26 @@ static void test_items(void) r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); ok(r != 0, "ret %d\n", r); + /* set text to callback value already having it */ + r = SendMessage(hwnd, LVM_DELETEALLITEMS, 0, 0); + expect(TRUE, r); + memset (&item, 0, sizeof (item)); + item.mask = LVIF_TEXT; + item.pszText = LPSTR_TEXTCALLBACK; + item.iItem = 0; + r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); + ok(r == 0, "ret %d\n", r); + memset (&item, 0, sizeof (item)); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + item.pszText = LPSTR_TEXTCALLBACK; + r = SendMessage(hwnd, LVM_SETITEMTEXT, 0 , (LPARAM) &item); + expect(TRUE, r); + + ok_sequence(sequences, PARENT_SEQ_INDEX, textcallback_set_again_parent_seq, + "check callback text comparison rule", TRUE); + DestroyWindow(hwnd); } @@ -1983,6 +2016,35 @@ static void test_ownerdata(void) res = SendMessageA(hwnd, LVM_SETITEM, 0, (LPARAM)&item); expect(FALSE, res); DestroyWindow(hwnd); + + /* check notifications after focused/selected changed */ + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0); + ok(res != 0, "Expected LVM_SETITEMCOUNT to succeed\n"); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + memset(&item, 0, sizeof(item)); + item.stateMask = LVIS_SELECTED; + item.state = LVIS_SELECTED; + res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + expect(TRUE, res); + + ok_sequence(sequences, PARENT_SEQ_INDEX, ownderdata_select_focus_parent_seq, + "ownerdata select notification", TRUE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + memset(&item, 0, sizeof(item)); + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + expect(TRUE, res); + + ok_sequence(sequences, PARENT_SEQ_INDEX, ownderdata_select_focus_parent_seq, + "ownerdata focus notification", TRUE); + DestroyWindow(hwnd); } static void test_norecompute(void) diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index 2ec3ea1..16ab542 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -47,7 +47,8 @@ struct message msg_flags_t flags; /* message props */ WPARAM wParam; /* expected value of wParam */ LPARAM lParam; /* expected value of lParam */ - UINT id; /* id of the window */ + UINT id; /* extra message data: id of the window, + notify code etc. */ }; struct msg_sequence
1
0
0
0
Nikolay Sivov : comctl32/header: Make Header_* macros match PSDK.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: b4e7e257e07ee21f2189e41101d13dceefe60c46 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4e7e257e07ee21f2189e4110…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon May 11 21:19:24 2009 +0400 comctl32/header: Make Header_* macros match PSDK. --- dlls/comctl32/listview.c | 7 ++++--- include/commctrl.h | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index f268855..f31175f 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4698,7 +4698,7 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn) LISTVIEW_GetHeaderRect(infoPtr, nColumn, &rcCol); - if (!Header_DeleteItem(infoPtr->hwndHeader, nColumn)) + if (!SendMessageW(infoPtr->hwndHeader, HDM_DELETEITEM, nColumn, 0)) return FALSE; Free(DPA_GetPtr(infoPtr->hdpaColumns, nColumn)); @@ -6019,7 +6019,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR } if (infoPtr->hwndHeader) - return Header_GetItemRect(infoPtr->hwndHeader, lprc->top, lprc); + return SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, lprc->top, (LPARAM)lprc); else { memset(lprc, 0, sizeof(RECT)); @@ -6983,7 +6983,8 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, if (DPA_InsertPtr(infoPtr->hdpaColumns, nNewColumn, lpColumnInfo) == -1) goto fail; if (lpColumn->mask & LVCF_FMT) lpColumnInfo->fmt = lpColumn->fmt; - if (!Header_GetItemRect(infoPtr->hwndHeader, nNewColumn, &lpColumnInfo->rcHeader)) goto fail; + if (!SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, nNewColumn, (LPARAM)&lpColumnInfo->rcHeader)) + goto fail; /* now we have to actually adjust the data */ if (!(infoPtr->dwStyle & LVS_OWNERDATA) && infoPtr->nItemCount > 0) diff --git a/include/commctrl.h b/include/commctrl.h index d3c24cd..5561e1d 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -974,14 +974,14 @@ typedef struct tagNMHDFILTERBTNCLICK } NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK; #define Header_GetItemCount(hwndHD) \ - (INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L) + (INT)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L) #define Header_InsertItemA(hwndHD,i,phdi) \ (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi)) #define Header_InsertItemW(hwndHD,i,phdi) \ (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi)) #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem) #define Header_DeleteItem(hwndHD,i) \ - (BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L) + (BOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L) #define Header_GetItemA(hwndHD,i,phdi) \ (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi)) #define Header_GetItemW(hwndHD,i,phdi) \ @@ -993,27 +993,27 @@ typedef struct tagNMHDFILTERBTNCLICK (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi)) #define Header_SetItem WINELIB_NAME_AW(Header_SetItem) #define Header_Layout(hwndHD,playout) \ - (BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout)) + (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout)) #define Header_GetItemRect(hwnd,iItem,lprc) \ - (BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc) + (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc) #define Header_SetImageList(hwnd,himl) \ - (HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl) + (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl) #define Header_GetImageList(hwnd) \ - (HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0) + (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0) #define Header_OrderToIndex(hwnd,i) \ - (INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0) + (INT)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0) #define Header_CreateDragImage(hwnd,i) \ - (HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0) + (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0) #define Header_GetOrderArray(hwnd,iCount,lpi) \ - (BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi) + (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi) #define Header_SetOrderArray(hwnd,iCount,lpi) \ - (BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi) + (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi) #define Header_SetHotDivider(hwnd,fPos,dw) \ - (INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw) + (INT)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw) #define Header_SetUnicodeFormat(hwnd,fUnicode) \ - (BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0) + (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0) #define Header_GetUnicodeFormat(hwnd) \ - (BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0) + (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0) /* Win32 5.1 Button Theme */ #define WC_BUTTONA "Button"
1
0
0
0
Roderick Colenbrander : opengl32: Add a wglShareLists test.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: 03c6a0d9d1ba17be8ba8ea15b167bd2b80e915da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03c6a0d9d1ba17be8ba8ea15b…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon May 11 22:12:10 2009 +0200 opengl32: Add a wglShareLists test. --- dlls/opengl32/tests/opengl.c | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 49659eb..48a75f8 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -285,6 +285,59 @@ static void test_setpixelformat(HDC winhdc) } } +static void test_sharelists(HDC winhdc) +{ + HGLRC hglrc1, hglrc2, hglrc3; + int res; + + hglrc1 = wglCreateContext(winhdc); + res = wglShareLists(0, 0); + ok(res == FALSE, "Sharing display lists for no contexts passed!\n"); + + /* Test 1: Create a context and just share lists without doing anything special */ + hglrc2 = wglCreateContext(winhdc); + if(hglrc2) + { + res = wglShareLists(hglrc1, hglrc2); + ok(res, "Sharing of display lists failed\n"); + wglDeleteContext(hglrc2); + } + + /* Test 2: Share display lists with a 'destination' context which has been made current */ + hglrc2 = wglCreateContext(winhdc); + if(hglrc2) + { + res = wglMakeCurrent(winhdc, hglrc2); + ok(res, "Make current failed\n"); + res = wglShareLists(hglrc1, hglrc2); + todo_wine ok(res, "Sharing display lists with a destination context which has been made current passed\n"); + wglMakeCurrent(0, 0); + wglDeleteContext(hglrc2); + } + + /* Test 3: Share display lists with a context which already shares display lists with another context. + * According to MSDN the second paramater can't share any display lists but some buggy drivers might allow it */ + hglrc3 = wglCreateContext(winhdc); + if(hglrc3) + { + res = wglShareLists(hglrc3, hglrc1); + ok(res == FALSE, "Sharing of display lists failed for a context which already shared lists before\n"); + wglDeleteContext(hglrc3); + } + + /* Test 4: Share display lists with a 'source' context which has been made current */ + hglrc2 = wglCreateContext(winhdc); + if(hglrc2) + { + res = wglMakeCurrent(winhdc, hglrc1); + ok(res, "Make current failed\n"); + res = wglShareLists(hglrc1, hglrc2); + ok(res, "Sharing display lists with a source context which has been made current passed\n"); + wglMakeCurrent(0, 0); + wglDeleteContext(hglrc2); + } +} + static void test_makecurrent(HDC winhdc) { BOOL ret; @@ -601,6 +654,7 @@ START_TEST(opengl) test_makecurrent(hdc); test_setpixelformat(hdc); + test_sharelists(hdc); test_colorbits(hdc); test_gdi_dbuf(hdc);
1
0
0
0
Jacek Caban : mshtml: Handle aCount < buf_size case correctly in nsIInputStream::Read implementation.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: db0bd528e77e2d2d6307b4d21d2635c5abe3cf81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db0bd528e77e2d2d6307b4d21…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 11 23:08:24 2009 +0200 mshtml: Handle aCount < buf_size case correctly in nsIInputStream::Read implementation. --- dlls/mshtml/navigate.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 6e41699..f882e6c 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -152,18 +152,21 @@ static nsresult NSAPI nsInputStream_Read(nsIInputStream *iface, char *aBuf, PRUi PRUint32 *_retval) { nsProtocolStream *This = NSINSTREAM_THIS(iface); + DWORD read = aCount; TRACE("(%p)->(%p %d %p)\n", This, aBuf, aCount, _retval); - /* Gecko always calls Read with big enough buffer */ - if(aCount < This->buf_size) - FIXME("aCount < This->buf_size\n"); + if(read > This->buf_size) + read = This->buf_size; - *_retval = This->buf_size; - if(This->buf_size) - memcpy(aBuf, This->buf, This->buf_size); - This->buf_size = 0; + if(read) { + memcpy(aBuf, This->buf, read); + if(read < This->buf_size) + memmove(This->buf, This->buf+read, This->buf_size-read); + This->buf_size -= read; + } + *_retval = read; return NS_OK; }
1
0
0
0
Jacek Caban : urlmon: Moved notif window handling to bindprot.c.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: 372a0f24a2257d5a271bb1778a1b1bc89ad7365b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=372a0f24a2257d5a271bb1778…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 11 22:02:35 2009 +0200 urlmon: Moved notif window handling to bindprot.c. --- dlls/urlmon/binding.c | 82 -------------------------------- dlls/urlmon/bindprot.c | 114 +++++++++++++++++++++++++++++++++++++------- dlls/urlmon/urlmon_main.h | 3 - 3 files changed, 96 insertions(+), 103 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 8eca0cf..913f8fa 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -120,9 +120,6 @@ struct Binding { #define STREAM(x) ((IStream*) &(x)->lpStreamVtbl) #define HTTPNEG2(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl) -#define WM_MK_CONTINUE (WM_USER+101) -#define WM_MK_RELEASE (WM_USER+102) - static void fill_stgmed_buffer(stgmed_buf_t *buf) { DWORD read = 0; @@ -137,85 +134,6 @@ static void fill_stgmed_buffer(stgmed_buf_t *buf) buf->init = TRUE; } -static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - case WM_MK_CONTINUE2: - handle_bindprot_task((void*)lParam); - return 0; - case WM_MK_RELEASE: { - tls_data_t *data = get_tls_data(); - - if(!--data->notif_hwnd_cnt) { - DestroyWindow(hwnd); - data->notif_hwnd = NULL; - } - } - } - - return DefWindowProcW(hwnd, msg, wParam, lParam); -} - -HWND get_notif_hwnd(void) -{ - static ATOM wnd_class = 0; - tls_data_t *tls_data; - - static const WCHAR wszURLMonikerNotificationWindow[] = - {'U','R','L',' ','M','o','n','i','k','e','r',' ', - 'N','o','t','i','f','i','c','a','t','i','o','n',' ','W','i','n','d','o','w',0}; - - tls_data = get_tls_data(); - if(!tls_data) - return NULL; - - if(tls_data->notif_hwnd_cnt) { - tls_data->notif_hwnd_cnt++; - return tls_data->notif_hwnd; - } - - if(!wnd_class) { - static WNDCLASSEXW wndclass = { - sizeof(wndclass), 0, - notif_wnd_proc, 0, 0, - NULL, NULL, NULL, NULL, NULL, - wszURLMonikerNotificationWindow, - NULL - }; - - wndclass.hInstance = URLMON_hInstance; - - wnd_class = RegisterClassExW(&wndclass); - if (!wnd_class && GetLastError() == ERROR_CLASS_ALREADY_EXISTS) - wnd_class = 1; - } - - tls_data->notif_hwnd = CreateWindowExW(0, wszURLMonikerNotificationWindow, - wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE, - NULL, URLMON_hInstance, NULL); - if(tls_data->notif_hwnd) - tls_data->notif_hwnd_cnt++; - - TRACE("hwnd = %p\n", tls_data->notif_hwnd); - - return tls_data->notif_hwnd; -} - -void release_notif_hwnd(HWND hwnd) -{ - tls_data_t *data = get_tls_data(); - - if(!data || data->notif_hwnd != hwnd) { - PostMessageW(data->notif_hwnd, WM_MK_RELEASE, 0, 0); - return; - } - - if(!--data->notif_hwnd_cnt) { - DestroyWindow(data->notif_hwnd); - data->notif_hwnd = NULL; - } -} - static void dump_BINDINFO(BINDINFO *bi) { static const char * const BINDINFOF_str[] = { diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 9203755..7235b63 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -67,32 +67,110 @@ struct BindProtocol { #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpInternetProtocolSinkVtbl) -void handle_bindprot_task(void *v) +#define WM_MK_CONTINUE (WM_USER+101) +#define WM_MK_RELEASE (WM_USER+102) + +static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - BindProtocol *This = v; - task_header_t *task; + switch(msg) { + case WM_MK_CONTINUE: { + BindProtocol *This = (BindProtocol*)lParam; + task_header_t *task; + + while(1) { + EnterCriticalSection(&This->section); + + task = This->task_queue_head; + if(task) { + This->task_queue_head = task->next; + if(!This->task_queue_head) + This->task_queue_tail = NULL; + } + + LeaveCriticalSection(&This->section); - while(1) { - EnterCriticalSection(&This->section); + if(!task) + break; - task = This->task_queue_head; - if(task) { - This->task_queue_head = task->next; - if(!This->task_queue_head) - This->task_queue_tail = NULL; + This->continue_call++; + task->proc(This, task); + This->continue_call--; } - LeaveCriticalSection(&This->section); + IInternetProtocol_Release(PROTOCOL(This)); + return 0; + } + case WM_MK_RELEASE: { + tls_data_t *data = get_tls_data(); - if(!task) - break; + if(!--data->notif_hwnd_cnt) { + DestroyWindow(hwnd); + data->notif_hwnd = NULL; + } + } + } + + return DefWindowProcW(hwnd, msg, wParam, lParam); +} + +HWND get_notif_hwnd(void) +{ + static ATOM wnd_class = 0; + tls_data_t *tls_data; + + static const WCHAR wszURLMonikerNotificationWindow[] = + {'U','R','L',' ','M','o','n','i','k','e','r',' ', + 'N','o','t','i','f','i','c','a','t','i','o','n',' ','W','i','n','d','o','w',0}; - This->continue_call++; - task->proc(This, task); - This->continue_call--; + tls_data = get_tls_data(); + if(!tls_data) + return NULL; + + if(tls_data->notif_hwnd_cnt) { + tls_data->notif_hwnd_cnt++; + return tls_data->notif_hwnd; + } + + if(!wnd_class) { + static WNDCLASSEXW wndclass = { + sizeof(wndclass), 0, + notif_wnd_proc, 0, 0, + NULL, NULL, NULL, NULL, NULL, + wszURLMonikerNotificationWindow, + NULL + }; + + wndclass.hInstance = URLMON_hInstance; + + wnd_class = RegisterClassExW(&wndclass); + if (!wnd_class && GetLastError() == ERROR_CLASS_ALREADY_EXISTS) + wnd_class = 1; + } + + tls_data->notif_hwnd = CreateWindowExW(0, wszURLMonikerNotificationWindow, + wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE, + NULL, URLMON_hInstance, NULL); + if(tls_data->notif_hwnd) + tls_data->notif_hwnd_cnt++; + + TRACE("hwnd = %p\n", tls_data->notif_hwnd); + + return tls_data->notif_hwnd; +} + +void release_notif_hwnd(HWND hwnd) +{ + tls_data_t *data = get_tls_data(); + + if(!data || data->notif_hwnd != hwnd) { + PostMessageW(data->notif_hwnd, WM_MK_RELEASE, 0, 0); + return; } - IInternetProtocol_Release(PROTOCOL(This)); + if(!--data->notif_hwnd_cnt) { + DestroyWindow(data->notif_hwnd); + data->notif_hwnd = NULL; + } } static void push_task(BindProtocol *This, task_header_t *task, task_proc_t proc) @@ -116,7 +194,7 @@ static void push_task(BindProtocol *This, task_header_t *task, task_proc_t proc) if(do_post) { IInternetProtocol_AddRef(PROTOCOL(This)); - PostMessageW(This->notif_hwnd, WM_MK_CONTINUE2, 0, (LPARAM)This); + PostMessageW(This->notif_hwnd, WM_MK_CONTINUE, 0, (LPARAM)This); } } diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index 13eb4f3..c3f9448 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -119,9 +119,6 @@ tls_data_t *get_tls_data(void); HWND get_notif_hwnd(void); void release_notif_hwnd(HWND); -#define WM_MK_CONTINUE2 (WM_USER+103) -void handle_bindprot_task(void*); - static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len);
1
0
0
0
Jacek Caban : urlmon: Get rid of no longer needed values in Binding object.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: 89ab83db5d03e7ecd6c0c5a0a079fe584fdd2b4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89ab83db5d03e7ecd6c0c5a0a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 11 22:02:12 2009 +0200 urlmon: Get rid of no longer needed values in Binding object. --- dlls/urlmon/binding.c | 39 --------------------------------------- 1 files changed, 0 insertions(+), 39 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index b49ee8c..8eca0cf 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -100,18 +100,14 @@ struct Binding { LPWSTR url; IID iid; BOOL report_mime; - DWORD continue_call; DWORD state; HRESULT hres; download_state_t download_state; IUnknown *obj; IMoniker *mon; IBindCtx *bctx; - - DWORD apartment_thread; HWND notif_hwnd; - task_header_t *task_queue_head, *task_queue_tail; CRITICAL_SECTION section; }; @@ -127,24 +123,6 @@ struct Binding { #define WM_MK_CONTINUE (WM_USER+101) #define WM_MK_RELEASE (WM_USER+102) -static task_header_t *pop_task(Binding *binding) -{ - task_header_t *ret; - - EnterCriticalSection(&binding->section); - - ret = binding->task_queue_head; - if(ret) { - binding->task_queue_head = ret->next; - if(!binding->task_queue_head) - binding->task_queue_tail = NULL; - } - - LeaveCriticalSection(&binding->section); - - return ret; -} - static void fill_stgmed_buffer(stgmed_buf_t *buf) { DWORD read = 0; @@ -162,19 +140,6 @@ static void fill_stgmed_buffer(stgmed_buf_t *buf) static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { - case WM_MK_CONTINUE: { - Binding *binding = (Binding*)lParam; - task_header_t *task; - - while((task = pop_task(binding))) { - binding->continue_call++; - task->proc(binding, task); - binding->continue_call--; - } - - IBinding_Release(BINDING(binding)); - return 0; - } case WM_MK_CONTINUE2: handle_bindprot_task((void*)lParam); return 0; @@ -1162,9 +1127,6 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres if(This->download_state == END_DOWNLOAD || (This->state & BINDING_STOPPED)) return; - if(GetCurrentThreadId() != This->apartment_thread) - FIXME("called from worker thread\n"); - if(This->report_mime) mime_available(This, NULL, TRUE); @@ -1513,7 +1475,6 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, ret->to_object = to_obj; ret->iid = *riid; - ret->apartment_thread = GetCurrentThreadId(); ret->notif_hwnd = get_notif_hwnd(); ret->report_mime = !binding_ctx; ret->download_state = BEFORE_DOWNLOAD;
1
0
0
0
Jacek Caban : urlmon: Get rid of no longer needed thread checking in Binding::ReportProgress.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: cd30018dbe49ea38532b6bc1feb86e8c7673b7a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd30018dbe49ea38532b6bc1f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 11 22:01:54 2009 +0200 urlmon: Get rid of no longer needed thread checking in Binding::ReportProgress. --- dlls/urlmon/binding.c | 91 ++----------------------------------------------- 1 files changed, 3 insertions(+), 88 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 60152a5..b49ee8c 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -127,23 +127,6 @@ struct Binding { #define WM_MK_CONTINUE (WM_USER+101) #define WM_MK_RELEASE (WM_USER+102) -static void push_task(Binding *binding, task_header_t *task, task_proc_t proc) -{ - task->proc = proc; - task->next = NULL; - - EnterCriticalSection(&binding->section); - - if(binding->task_queue_tail) { - binding->task_queue_tail->next = task; - binding->task_queue_tail = task; - }else { - binding->task_queue_tail = binding->task_queue_head = task; - } - - LeaveCriticalSection(&binding->section); -} - static task_header_t *pop_task(Binding *binding) { task_header_t *ret; @@ -353,32 +336,12 @@ static void handle_mime_available(Binding *binding, BOOL verify) binding->clipboard_format = RegisterClipboardFormatW(binding->mime); } -typedef struct { - task_header_t header; - BOOL verify; -} mime_available_task_t; - -static void mime_available_proc(Binding *binding, task_header_t *t) -{ - mime_available_task_t *task = (mime_available_task_t*)t; - - handle_mime_available(binding, task->verify); - - heap_free(task); -} - static void mime_available(Binding *This, LPCWSTR mime, BOOL verify) { if(mime) set_binding_mime(This, mime); - if(GetCurrentThreadId() == This->apartment_thread) { - handle_mime_available(This, verify); - }else { - mime_available_task_t *task = heap_alloc(sizeof(task_header_t)); - task->verify = verify; - push_task(This, &task->header, mime_available_proc); - } + handle_mime_available(This, verify); } static void stop_binding(Binding *binding, HRESULT hres, LPCWSTR str) @@ -1137,59 +1100,11 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface, return E_FAIL; } -typedef struct { - task_header_t header; - - Binding *binding; - ULONG progress; - ULONG progress_max; - ULONG status_code; - LPWSTR status_text; -} on_progress_task_t; - -static void on_progress_proc(Binding *binding, task_header_t *t) -{ - on_progress_task_t *task = (on_progress_task_t*)t; - - IBindStatusCallback_OnProgress(binding->callback, task->progress, - task->progress_max, task->status_code, task->status_text); - - heap_free(task->status_text); - heap_free(task); -} - static void on_progress(Binding *This, ULONG progress, ULONG progress_max, ULONG status_code, LPCWSTR status_text) { - on_progress_task_t *task; - - if(GetCurrentThreadId() == This->apartment_thread && !This->continue_call) { - IBindStatusCallback_OnProgress(This->callback, progress, progress_max, - status_code, status_text); - return; - } - - task = heap_alloc(sizeof(on_progress_task_t)); - - task->progress = progress; - task->progress_max = progress_max; - task->status_code = status_code; - - if(status_text) { - DWORD size = (strlenW(status_text)+1)*sizeof(WCHAR); - - task->status_text = heap_alloc(size); - memcpy(task->status_text, status_text, size); - }else { - task->status_text = NULL; - } - - push_task(This, &task->header, on_progress_proc); - - if(GetCurrentThreadId() != This->apartment_thread) { - IBinding_AddRef(BINDING(This)); - PostMessageW(This->notif_hwnd, WM_MK_CONTINUE, 0, (LPARAM)This); - } + IBindStatusCallback_OnProgress(This->callback, progress, progress_max, + status_code, status_text); } static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink *iface,
1
0
0
0
Jacek Caban : urlmon: Get rid of no longer needed thread checking in Binding object' s ReportData and ReportResult implementation.
by Alexandre Julliard
12 May '09
12 May '09
Module: wine Branch: master Commit: 8ea07306e128a10b1d92fbff5f757fc12e13aeb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ea07306e128a10b1d92fbff5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 11 22:01:39 2009 +0200 urlmon: Get rid of no longer needed thread checking in Binding object's ReportData and ReportResult implementation. --- dlls/urlmon/binding.c | 64 ++---------------------------------------------- 1 files changed, 3 insertions(+), 61 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 2e07f96..60152a5 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -1305,22 +1305,6 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres } } -typedef struct { - task_header_t header; - DWORD bscf; - ULONG progress; - ULONG progress_max; -} report_data_task_t; - -static void report_data_proc(Binding *binding, task_header_t *t) -{ - report_data_task_t *task = (report_data_task_t*)t; - - report_data(binding, task->bscf, task->progress, task->progress_max); - - heap_free(task); -} - static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax) { @@ -1328,42 +1312,10 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa TRACE("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax); - if(GetCurrentThreadId() != This->apartment_thread) - FIXME("called from worked hread\n"); - - if(This->continue_call) { - report_data_task_t *task = heap_alloc(sizeof(report_data_task_t)); - task->bscf = grfBSCF; - task->progress = ulProgress; - task->progress_max = ulProgressMax; - - push_task(This, &task->header, report_data_proc); - }else { - report_data(This, grfBSCF, ulProgress, ulProgressMax); - } - + report_data(This, grfBSCF, ulProgress, ulProgressMax); return S_OK; } -typedef struct { - task_header_t header; - - HRESULT hres; - LPWSTR str; -} report_result_task_t; - -static void report_result_proc(Binding *binding, task_header_t *t) -{ - report_result_task_t *task = (report_result_task_t*)t; - - IInternetProtocol_Terminate(binding->protocol, 0); - - stop_binding(binding, task->hres, task->str); - - heap_free(task->str); - heap_free(task); -} - static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult) { @@ -1371,18 +1323,8 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); - if(GetCurrentThreadId() == This->apartment_thread && !This->continue_call) { - IInternetProtocol_Terminate(This->protocol, 0); - stop_binding(This, hrResult, szResult); - }else { - report_result_task_t *task = heap_alloc(sizeof(report_result_task_t)); - - task->hres = hrResult; - task->str = heap_strdupW(szResult); - - push_task(This, &task->header, report_result_proc); - } - + IInternetProtocol_Terminate(This->protocol, 0); + stop_binding(This, hrResult, szResult); return S_OK; }
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
80
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
Results per page:
10
25
50
100
200