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
Jacek Caban : vbscript: Added ScriptDisp::GetIDsOfNames implementation.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: ba611c0d3a4f091da0028d16a047fc7295510355 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba611c0d3a4f091da0028d16a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 18 12:26:03 2012 +0200 vbscript: Added ScriptDisp::GetIDsOfNames implementation. --- dlls/vbscript/tests/vbscript.c | 7 ++++++- dlls/vbscript/vbdisp.c | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c index 27153f8..3dd64dd 100644 --- a/dlls/vbscript/tests/vbscript.c +++ b/dlls/vbscript/tests/vbscript.c @@ -350,13 +350,18 @@ static void parse_script(IActiveScriptParse *parse, const char *src) #define get_disp_id(a,b,c,d) _get_disp_id(__LINE__,a,b,c,d) static void _get_disp_id(unsigned line, IDispatchEx *dispex, const char *name, HRESULT exhres, DISPID *id) { + DISPID id2; BSTR str; HRESULT hres; str = a2bstr(name); hres = IDispatchEx_GetDispID(dispex, str, 0, id); - SysFreeString(str); ok_(__FILE__,line)(hres == exhres, "GetDispID(%s) returned %08x, expected %08x\n", name, hres, exhres); + + hres = IDispatchEx_GetIDsOfNames(dispex, &IID_NULL, &str, 1, 0, &id2); + SysFreeString(str); + ok_(__FILE__,line)(hres == exhres, "GetIDsOfNames(%s) returned %08x, expected %08x\n", name, hres, exhres); + ok_(__FILE__,line)(*id == id2, "GetIDsOfNames(%s) id != id2\n", name); } static void test_no_script_dispatch(IActiveScript *script) diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 1b2b8fe..8b0e4f2 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -682,13 +682,22 @@ static HRESULT WINAPI ScriptDisp_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LC } static HRESULT WINAPI ScriptDisp_GetIDsOfNames(IDispatchEx *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, - DISPID *rgDispId) + LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface); - FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + UINT i; + HRESULT hres; + + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); - return E_NOTIMPL; + + for(i=0; i < cNames; i++) { + hres = IDispatchEx_GetDispID(&This->IDispatchEx_iface, rgszNames[i], 0, rgDispId+i); + if(FAILED(hres)) + return hres; + } + + return S_OK; } static HRESULT WINAPI ScriptDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember,
1
0
0
0
Jacek Caban : vbscript: Added support for do.. loop statement without an expression.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 5a2b3e0de64bdebf71400ed70eccf06758f29adb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5a2b3e0de64bdebf71400ed70…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 18 12:25:42 2012 +0200 vbscript: Added support for do..loop statement without an expression. --- dlls/vbscript/compile.c | 15 +++++++++++---- dlls/vbscript/parser.y | 1 + dlls/vbscript/tests/lang.vbs | 7 +++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 89e290d..327d97b 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -625,6 +625,7 @@ static HRESULT compile_dowhile_statement(compile_ctx_t *ctx, while_statement_t * { statement_ctx_t loop_ctx = {0}; unsigned start_addr; + vbsop_t jmp_op; HRESULT hres; start_addr = ctx->instr_cnt; @@ -636,11 +637,17 @@ static HRESULT compile_dowhile_statement(compile_ctx_t *ctx, while_statement_t * if(FAILED(hres)) return hres; - hres = compile_expression(ctx, stat->expr); - if(FAILED(hres)) - return hres; + if(stat->expr) { + hres = compile_expression(ctx, stat->expr); + if(FAILED(hres)) + return hres; + + jmp_op = stat->stat.type == STAT_DOUNTIL ? OP_jmp_false : OP_jmp_true; + }else { + jmp_op = OP_jmp; + } - hres = push_instr_addr(ctx, stat->stat.type == STAT_DOUNTIL ? OP_jmp_false : OP_jmp_true, start_addr); + hres = push_instr_addr(ctx, jmp_op, start_addr); if(FAILED(hres)) return hres; diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index d5a9934..3f86b04 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -185,6 +185,7 @@ SimpleStatement | tDO tNL StatementsNl_opt tLOOP DoType Expression { $$ = new_while_statement(ctx, $5 ? STAT_DOWHILE : STAT_DOUNTIL, $6, $3); CHECK_ERROR; } + | tDO tNL StatementsNl_opt tLOOP { $$ = new_while_statement(ctx, STAT_DOWHILE, NULL, $3); CHECK_ERROR; } | FunctionDecl { $$ = new_function_statement(ctx, $1); CHECK_ERROR; } | tEXIT tDO { $$ = new_statement(ctx, STAT_EXITDO, 0); CHECK_ERROR; } | tEXIT tFOR { $$ = new_statement(ctx, STAT_EXITFOR, 0); CHECK_ERROR; } diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index fd93df6..76f4003 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -346,6 +346,13 @@ do until false loop x = false +do + if x then exit do + x = true +loop +call ok(x, "x is false after do..loop?") + +x = false y = false do if x then
1
0
0
0
Jacek Caban : vbscript: Added Len implementation.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 3fa78601453abe7813a0b0d67bf5854cd39ddc3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3fa78601453abe7813a0b0d67…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 18 12:25:26 2012 +0200 vbscript: Added Len implementation. --- dlls/vbscript/global.c | 24 ++++++++++++++++++++++-- dlls/vbscript/tests/api.vbs | 6 ++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 3c28e96..0513664 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -468,8 +468,28 @@ static HRESULT Global_RGB(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA static HRESULT Global_Len(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - FIXME("\n"); - return E_NOTIMPL; + DWORD len; + HRESULT hres; + + TRACE("%s\n", debugstr_variant(arg)); + + if(V_VT(arg) == VT_NULL) + return return_null(res); + + if(V_VT(arg) != VT_BSTR) { + BSTR str; + + hres = to_string(arg, &str); + if(FAILED(hres)) + return hres; + + len = SysStringLen(str); + SysFreeString(str); + }else { + len = SysStringLen(V_BSTR(arg)); + } + + return return_int(res, len); } static HRESULT Global_LenB(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index fd339dd..c17c5b4 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -173,4 +173,10 @@ TestLCase 0.123, doubleAsString(0.123) TestLCase Empty, "" Call ok(getVT(LCase(Null)) = "VT_NULL", "getVT(LCase(Null)) = " & getVT(LCase(Null))) +Call ok(Len("abc") = 3, "Len(abc) = " & Len("abc")) +Call ok(Len("") = 0, "Len() = " & Len("")) +Call ok(Len(1) = 1, "Len(1) = " & Len(1)) +Call ok(isNull(Len(null)), "Len(null) = " & Len(null)) +Call ok(Len(empty) = 0, "Len(empty) = " & Len(empty)) + Call reportSuccess()
1
0
0
0
Jacek Caban : vbscript: Fixed parsing if statements with empty body.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 20b2d057d239a4f2eb8f6b0374d1183c322aaeff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20b2d057d239a4f2eb8f6b037…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 18 12:25:14 2012 +0200 vbscript: Fixed parsing if statements with empty body. --- dlls/vbscript/parser.y | 6 +++--- dlls/vbscript/tests/lang.vbs | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index baac315..d5a9934 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -228,7 +228,7 @@ Step_opt | tSTEP Expression { $$ = $2; } IfStatement - : tIF Expression tTHEN tNL StatementsNl ElseIfs_opt Else_opt tEND tIF + : tIF Expression tTHEN tNL StatementsNl_opt ElseIfs_opt Else_opt tEND tIF { $$ = new_if_statement(ctx, $2, $5, $6, $7); CHECK_ERROR; } | tIF Expression tTHEN Statement { $$ = new_if_statement(ctx, $2, $4, NULL, NULL); CHECK_ERROR; } | tIF Expression tTHEN Statement tELSE Statement EndIf_opt @@ -247,12 +247,12 @@ ElseIfs | ElseIf ElseIfs { $1->next = $2; $$ = $1; } ElseIf - : tELSEIF Expression tTHEN tNL StatementsNl + : tELSEIF Expression tTHEN tNL StatementsNl_opt { $$ = new_elseif_decl(ctx, $2, $5); } Else_opt : /* empty */ { $$ = NULL; } - | tELSE tNL StatementsNl { $$ = $3; } + | tELSE tNL StatementsNl_opt { $$ = $3; } CaseClausules : /* empty */ { $$ = NULL; } diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 90d5304..fd93df6 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -290,6 +290,22 @@ while not (x and y) wend call ok((x and y), "x or y is false after while") +if false then +' empty body +end if + +if false then + x = false +elseif true then +' empty body +end if + +if false then + x = false +else +' empty body +end if + while false wend
1
0
0
0
Jacek Caban : msi: Make script Session object visible by name.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 3b9a13e94c19a4cb59b7ab1dfa38a1455363cfd7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b9a13e94c19a4cb59b7ab1df…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 18 12:24:30 2012 +0200 msi: Make script Session object visible by name. --- dlls/msi/script.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/script.c b/dlls/msi/script.c index db80b1e..392c5ac 100644 --- a/dlls/msi/script.c +++ b/dlls/msi/script.c @@ -146,7 +146,7 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function hr = IActiveScriptParse_InitNew(pActiveScriptParse); if (FAILED(hr)) goto done; - hr = IActiveScript_AddNamedItem(pActiveScript, szSession, SCRIPTITEM_GLOBALMEMBERS); + hr = IActiveScript_AddNamedItem(pActiveScript, szSession, SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE); if (FAILED(hr)) goto done; hr = IActiveScriptParse_ParseScriptText(pActiveScriptParse, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL);
1
0
0
0
Jacek Caban : msi: Choose the right IActiveScriptParse* interface based on process type.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 645ce64196f98cc7b732565046ba27fd5686c762 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=645ce64196f98cc7b73256504…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 18 12:24:16 2012 +0200 msi: Choose the right IActiveScriptParse* interface based on process type. --- dlls/msi/script.c | 60 +++++++++++++++++++++++------------------------------ 1 files changed, 26 insertions(+), 34 deletions(-) diff --git a/dlls/msi/script.c b/dlls/msi/script.c index 94577ba..db80b1e 100644 --- a/dlls/msi/script.c +++ b/dlls/msi/script.c @@ -36,6 +36,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi); +#ifdef _WIN64 + +#define IActiveScriptParse_Release IActiveScriptParse64_Release +#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew +#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText + +#else + +#define IActiveScriptParse_Release IActiveScriptParse32_Release +#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew +#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText + +#endif + static const WCHAR szJScript[] = { 'J','S','c','r','i','p','t',0}; static const WCHAR szVBScript[] = { 'V','B','S','c','r','i','p','t',0}; static const WCHAR szSession[] = {'S','e','s','s','i','o','n',0}; @@ -81,8 +95,7 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function { HRESULT hr; IActiveScript *pActiveScript = NULL; - IActiveScriptParse32 *pActiveScriptParse32 = NULL; - IActiveScriptParse64 *pActiveScriptParse64 = NULL; + IActiveScriptParse *pActiveScriptParse = NULL; MsiActiveScriptSite *pActiveScriptSite = NULL; IDispatch *pDispatch = NULL; DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0}; @@ -124,40 +137,20 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function goto done; } - if (type & msidbCustomActionType64BitScript) - { - hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse64, (void **)&pActiveScriptParse64); - if (FAILED(hr)) goto done; - - hr = IActiveScript_SetScriptSite(pActiveScript, (IActiveScriptSite *)pActiveScriptSite); - if (FAILED(hr)) goto done; - - hr = IActiveScriptParse64_InitNew(pActiveScriptParse64); - if (FAILED(hr)) goto done; - - hr = IActiveScript_AddNamedItem(pActiveScript, szSession, SCRIPTITEM_GLOBALMEMBERS); - if (FAILED(hr)) goto done; - - hr = IActiveScriptParse64_ParseScriptText(pActiveScriptParse64, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL); - if (FAILED(hr)) goto done; - } - else - { - hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse32, (void **)&pActiveScriptParse32); - if (FAILED(hr)) goto done; + hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (void **)&pActiveScriptParse); + if (FAILED(hr)) goto done; - hr = IActiveScript_SetScriptSite(pActiveScript, (IActiveScriptSite *)pActiveScriptSite); - if (FAILED(hr)) goto done; + hr = IActiveScript_SetScriptSite(pActiveScript, (IActiveScriptSite *)pActiveScriptSite); + if (FAILED(hr)) goto done; - hr = IActiveScriptParse32_InitNew(pActiveScriptParse32); - if (FAILED(hr)) goto done; + hr = IActiveScriptParse_InitNew(pActiveScriptParse); + if (FAILED(hr)) goto done; - hr = IActiveScript_AddNamedItem(pActiveScript, szSession, SCRIPTITEM_GLOBALMEMBERS); - if (FAILED(hr)) goto done; + hr = IActiveScript_AddNamedItem(pActiveScript, szSession, SCRIPTITEM_GLOBALMEMBERS); + if (FAILED(hr)) goto done; - hr = IActiveScriptParse32_ParseScriptText(pActiveScriptParse32, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL); - if (FAILED(hr)) goto done; - } + hr = IActiveScriptParse_ParseScriptText(pActiveScriptParse, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL); + if (FAILED(hr)) goto done; hr = IActiveScript_SetScriptState(pActiveScript, SCRIPTSTATE_CONNECTED); if (FAILED(hr)) goto done; @@ -193,8 +186,7 @@ done: if (pDispatch) IDispatch_Release(pDispatch); if (pActiveScript) IActiveScript_Release(pActiveScript); - if (pActiveScriptParse32) IActiveScriptParse32_Release(pActiveScriptParse32); - if (pActiveScriptParse64) IActiveScriptParse64_Release(pActiveScriptParse64); + if (pActiveScriptParse) IActiveScriptParse_Release(pActiveScriptParse); if (pActiveScriptSite) { if (pActiveScriptSite->pSession) IDispatch_Release(pActiveScriptSite->pSession);
1
0
0
0
Alexandre Julliard : winex11: Add window data locking to the focus event handlers.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 2c9ce4968ada1b147c090d1eff2a60b9d0324fa7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c9ce4968ada1b147c090d1ef…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 18 11:24:55 2012 +0200 winex11: Add window data locking to the focus event handlers. --- dlls/winex11.drv/event.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 1c0cec3..c9ae725 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -516,15 +516,15 @@ DWORD EVENT_x11_time_to_win32_time(Time time) */ static inline BOOL can_activate_window( HWND hwnd ) { - struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); LONG style = GetWindowLongW( hwnd, GWL_STYLE ); + RECT rect; if (!(style & WS_VISIBLE)) return FALSE; if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE; if (style & WS_MINIMIZE) return FALSE; if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_NOACTIVATE) return FALSE; if (hwnd == GetDesktopWindow()) return FALSE; - if (data && IsRectEmpty( &data->window_rect )) return FALSE; + if (GetWindowRect( hwnd, &rect ) && IsRectEmpty( &rect )) return FALSE; return !(style & WS_DISABLED); } @@ -874,15 +874,15 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event ) clipping_cursor = 1; return; } - if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (!data->mapped || data->embedded) return; + if (!(data = get_win_data( hwnd ))) return; - if (!data->managed) + if (!data->managed && !data->embedded && data->mapped) { HWND hwndFocus = GetFocus(); if (hwndFocus && IsChild( hwnd, hwndFocus )) set_input_focus( thread_display(), data->whole_window ); } + release_win_data( data ); } @@ -1277,8 +1277,9 @@ void CDECL X11DRV_SetFocus( HWND hwnd ) struct x11drv_win_data *data; if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return; - if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!(data = get_win_data( hwnd ))) return; if (!data->managed) set_input_focus( display, data->whole_window ); + release_win_data( data ); }
1
0
0
0
Alexandre Julliard : winex11: Add a helper function to set input focus for non-managed windows.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: b8edf184ee33acce8b102d968e4bd5063ab97dc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8edf184ee33acce8b102d968…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 18 11:20:07 2012 +0200 winex11: Add a helper function to set input focus for non-managed windows. --- dlls/winex11.drv/event.c | 44 +++++++++++++++++++++++++++++++++++++++++++- dlls/winex11.drv/window.c | 30 ------------------------------ 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 0e8ba04..1c0cec3 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -530,6 +530,31 @@ static inline BOOL can_activate_window( HWND hwnd ) /********************************************************************** + * set_input_focus + * + * Try to force focus for non-managed windows. + */ +static void set_input_focus( Display *display, Window window ) +{ + XWindowChanges changes; + DWORD timestamp; + + if (!window) return; + + if (EVENT_x11_time_to_win32_time(0)) + /* ICCCM says don't use CurrentTime, so try to use last message time if possible */ + /* FIXME: this is not entirely correct */ + timestamp = GetMessageTime() - EVENT_x11_time_to_win32_time(0); + else + timestamp = CurrentTime; + + /* Set X focus and install colormap */ + changes.stack_mode = Above; + XConfigureWindow( display, window, CWStackMode, &changes ); + XSetInputFocus( display, window, RevertToParent, timestamp ); +} + +/********************************************************************** * set_focus */ static void set_focus( Display *display, HWND hwnd, Time time ) @@ -855,7 +880,8 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event ) if (!data->managed) { HWND hwndFocus = GetFocus(); - if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ + if (hwndFocus && IsChild( hwnd, hwndFocus )) + set_input_focus( thread_display(), data->whole_window ); } } @@ -1240,6 +1266,22 @@ void wait_for_withdrawn_state( HWND hwnd, BOOL set ) } +/***************************************************************** + * SetFocus (X11DRV.@) + * + * Set the X focus. + */ +void CDECL X11DRV_SetFocus( HWND hwnd ) +{ + Display *display = thread_display(); + struct x11drv_win_data *data; + + if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return; + if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!data->managed) set_input_focus( display, data->whole_window ); +} + + static HWND find_drop_window( HWND hQueryWnd, LPPOINT lpPt ) { RECT tempRect; diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 421d67d..94edb81 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1989,36 +1989,6 @@ void CDECL X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent ) } -/***************************************************************** - * SetFocus (X11DRV.@) - * - * Set the X focus. - */ -void CDECL X11DRV_SetFocus( HWND hwnd ) -{ - Display *display = thread_display(); - struct x11drv_win_data *data; - XWindowChanges changes; - DWORD timestamp; - - if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return; - if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (data->managed || !data->whole_window) return; - - if (EVENT_x11_time_to_win32_time(0)) - /* ICCCM says don't use CurrentTime, so try to use last message time if possible */ - /* FIXME: this is not entirely correct */ - timestamp = GetMessageTime() - EVENT_x11_time_to_win32_time(0); - else - timestamp = CurrentTime; - - /* Set X focus and install colormap */ - changes.stack_mode = Above; - XConfigureWindow( display, data->whole_window, CWStackMode, &changes ); - XSetInputFocus( display, data->whole_window, RevertToParent, timestamp ); -} - - static inline RECT get_surface_rect( const RECT *visible_rect ) { RECT rect;
1
0
0
0
Alexandre Julliard : winex11: Add window data locking to the system tray functions.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 41d0316522f35cecc5cafbbe48bdfe7443b69dd1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41d0316522f35cecc5cafbbe4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 18 11:17:32 2012 +0200 winex11: Add window data locking to the system tray functions. --- dlls/winex11.drv/systray.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index 4d9d837..819b542 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -564,8 +564,11 @@ static BOOL hide_icon( struct tray_icon *icon ) if (!icon->window) return TRUE; /* already hidden */ /* make sure we don't try to unmap it, it confuses some systray docks */ - if ((data = X11DRV_get_win_data( icon->window )) && data->embedded) data->mapped = FALSE; - + if ((data = get_win_data( icon->window ))) + { + if (data->embedded) data->mapped = FALSE; + release_win_data( data ); + } DestroyWindow(icon->window); DestroyWindow(icon->tooltip); icon->window = 0; @@ -613,8 +616,8 @@ static BOOL modify_icon( struct tray_icon *icon, NOTIFYICONDATAW *nid ) if (icon->display != -1) InvalidateRect( icon->window, NULL, TRUE ); else { - struct x11drv_win_data *data = X11DRV_get_win_data( icon->window ); - if (data) XClearArea( gdi_display, data->whole_window, 0, 0, 0, 0, True ); + Window win = X11DRV_get_whole_window( icon->window ); + if (win) XClearArea( gdi_display, win, 0, 0, 0, 0, True ); } } }
1
0
0
0
Alexandre Julliard : winex11: Add window data locking to the drag and drop functions.
by Alexandre Julliard
18 Sep '12
18 Sep '12
Module: wine Branch: master Commit: 731e497a8737b3656e50245219fe323f9a73f148 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=731e497a8737b3656e5024521…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 18 11:37:33 2012 +0200 winex11: Add window data locking to the drag and drop functions. --- dlls/winex11.drv/event.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 1134316..0e8ba04 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1286,23 +1286,24 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event ) unsigned long aux_long; unsigned char* p_data = NULL; Atom atom_aux; - int x, y, dummy; + int x, y, cx, cy, dummy; BOOL bAccept; Window win, w_aux_root, w_aux_child; - win = X11DRV_get_whole_window(hWnd); + if (!(data = get_win_data( hWnd ))) return; + cx = data->whole_rect.right - data->whole_rect.left; + cy = data->whole_rect.bottom - data->whole_rect.top; + win = data->whole_window; + release_win_data( data ); + XQueryPointer( event->display, win, &w_aux_root, &w_aux_child, &x, &y, &dummy, &dummy, (unsigned int*)&aux_long); x += virtual_screen_rect.left; y += virtual_screen_rect.top; - if (!(data = X11DRV_get_win_data( hWnd ))) return; - /* find out drop point and drop window */ - if( x < 0 || y < 0 || - x > (data->whole_rect.right - data->whole_rect.left) || - y > (data->whole_rect.bottom - data->whole_rect.top) ) - { + if (x < 0 || y < 0 || x > cx || y > cy) + { bAccept = GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES; x = 0; y = 0; @@ -1439,7 +1440,7 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event ) hDrop = GlobalAlloc( GMEM_SHARE, drop_len ); lpDrop = GlobalLock( hDrop ); - if( lpDrop && (win_data = X11DRV_get_win_data( hWnd ))) + if( lpDrop && (win_data = get_win_data( hWnd ))) { lpDrop->pFiles = sizeof(DROPFILES); lpDrop->pt.x = x; @@ -1451,6 +1452,7 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event ) y > (win_data->client_rect.bottom - win_data->whole_rect.top) ); lpDrop->fWide = FALSE; p_drop = (char*)(lpDrop + 1); + release_win_data( win_data ); } /* create message content */
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
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