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
March 2021
----- 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
1163 discussions
Start a n
N
ew thread
Hugh McMaster : reg: Simplify basic syntax checks.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 8801118e384b7388a0fa5c43b5540bfd7f257ab6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8801118e384b7388a0fa5c43…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Mar 18 22:36:50 2021 +1100 reg: Simplify basic syntax checks. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/reg.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 354ece86f61..533a9378f92 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -349,7 +349,6 @@ static enum operations get_operation(const WCHAR *str, int *op_help) int __cdecl wmain(int argc, WCHAR *argvW[]) { int i, op, op_help, ret; - BOOL show_op_help = FALSE; static const WCHAR switchVAW[] = {'v','a',0}; static const WCHAR switchVEW[] = {'v','e',0}; WCHAR *key_name, *path, *value_name = NULL, *type = NULL, *data = NULL, separator = '\0'; @@ -377,22 +376,26 @@ int __cdecl wmain(int argc, WCHAR *argvW[]) output_message(STRING_REG_HELP); return 1; } - - if (argc > 2) - show_op_help = is_help_switch(argvW[2]); - - if (argc == 2 || ((show_op_help || op == REG_IMPORT) && argc > 3)) + else if (argc == 2) /* Valid operation, no arguments supplied */ { output_message(STRING_INVALID_SYNTAX); output_message(STRING_FUNC_HELP, wcsupr(argvW[1])); return 1; } - else if (show_op_help) + + if (is_help_switch(argvW[2])) { output_message(op_help); return 0; } + if (op == REG_IMPORT && argc > 3) + { + output_message(STRING_INVALID_SYNTAX); + output_message(STRING_FUNC_HELP, wcsupr(argvW[1])); + return 1; + } + if (op == REG_IMPORT) return reg_import(argvW[2]);
1
0
0
0
Hugh McMaster : reg: Merge common header #includes into reg.h.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 7803c53cfe6635a5d3e0d9f58e743235746ec9d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7803c53cfe6635a5d3e0d9f5…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Mar 18 22:36:49 2021 +1100 reg: Merge common header #includes into reg.h. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/add.c | 2 -- programs/reg/delete.c | 2 -- programs/reg/export.c | 4 ---- programs/reg/import.c | 6 +----- programs/reg/query.c | 2 -- programs/reg/reg.c | 4 +--- programs/reg/reg.h | 2 ++ 7 files changed, 4 insertions(+), 18 deletions(-) diff --git a/programs/reg/add.c b/programs/reg/add.c index 2d8521f9234..054023df7ab 100644 --- a/programs/reg/add.c +++ b/programs/reg/add.c @@ -18,8 +18,6 @@ #include <errno.h> #include <stdlib.h> -#include <windows.h> -#include <wine/heap.h> #include "reg.h" static DWORD wchar_get_type(const WCHAR *type_name) diff --git a/programs/reg/delete.c b/programs/reg/delete.c index 530d4513ece..e0730e5c12f 100644 --- a/programs/reg/delete.c +++ b/programs/reg/delete.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windows.h> -#include <wine/heap.h> #include "reg.h" int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, diff --git a/programs/reg/export.c b/programs/reg/export.c index 3de57062b7f..214c94b1368 100644 --- a/programs/reg/export.c +++ b/programs/reg/export.c @@ -16,12 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windows.h> #include <stdio.h> #include <stdlib.h> - -#include <wine/heap.h> - #include "reg.h" static void write_file(HANDLE hFile, const WCHAR *str) diff --git a/programs/reg/import.c b/programs/reg/import.c index 7ad7b35d5dc..9e21bcc6a7e 100644 --- a/programs/reg/import.c +++ b/programs/reg/import.c @@ -16,15 +16,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windows.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> - -#include <wine/debug.h> -#include <wine/heap.h> - #include "reg.h" +#include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(reg); diff --git a/programs/reg/query.c b/programs/reg/query.c index 3d81d120bd2..b24edb2f0b2 100644 --- a/programs/reg/query.c +++ b/programs/reg/query.c @@ -17,8 +17,6 @@ */ #include <stdio.h> -#include <windows.h> -#include <wine/heap.h> #include "reg.h" static const WCHAR *reg_type_to_wchar(DWORD type) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index dab77530cce..354ece86f61 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -16,11 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windows.h> #include <stdlib.h> -#include <wine/debug.h> -#include <wine/heap.h> #include "reg.h" +#include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(reg); diff --git a/programs/reg/reg.h b/programs/reg/reg.h index 4cb31c4671a..b29c2c21a1f 100644 --- a/programs/reg/reg.h +++ b/programs/reg/reg.h @@ -19,6 +19,8 @@ #ifndef __REG_H__ #define __REG_H__ +#include <windows.h> +#include <wine/heap.h> #include "resource.h" #define MAX_SUBKEY_LEN 257
1
0
0
0
Hugh McMaster : reg: Use is_switch() where possible.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: ab94653e8bb093b88406f7c509c7157ac7033f28 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab94653e8bb093b88406f7c5…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Mar 18 22:36:48 2021 +1100 reg: Use is_switch() where possible. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/export.c | 8 +------- programs/reg/reg.c | 7 ++----- programs/reg/reg.h | 1 + 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/programs/reg/export.c b/programs/reg/export.c index 4d8bf95be0b..3de57062b7f 100644 --- a/programs/reg/export.c +++ b/programs/reg/export.c @@ -361,13 +361,7 @@ static HANDLE get_file_handle(WCHAR *filename, BOOL overwrite_file) static BOOL is_overwrite_switch(const WCHAR *s) { - if (lstrlenW(s) > 2) - return FALSE; - - if ((s[0] == '/' || s[0] == '-') && (s[1] == 'y' || s[1] == 'Y')) - return TRUE; - - return FALSE; + return is_switch(s, 'y'); } int reg_export(int argc, WCHAR *argv[]) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 071fb6f88ea..dab77530cce 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -289,7 +289,7 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path, WCHAR **long return TRUE; } -static BOOL is_switch(const WCHAR *s, const WCHAR c) +BOOL is_switch(const WCHAR *s, const WCHAR c) { if (lstrlenW(s) > 2) return FALSE; @@ -302,10 +302,7 @@ static BOOL is_switch(const WCHAR *s, const WCHAR c) static BOOL is_help_switch(const WCHAR *s) { - if (is_switch(s, '?') || is_switch(s, 'h')) - return TRUE; - - return FALSE; + return (is_switch(s, '?') || is_switch(s, 'h')); } enum operations { diff --git a/programs/reg/reg.h b/programs/reg/reg.h index b14470b2cbf..4cb31c4671a 100644 --- a/programs/reg/reg.h +++ b/programs/reg/reg.h @@ -40,6 +40,7 @@ BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info); HKEY path_get_rootkey(const WCHAR *path); WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD subkey_len); BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path, WCHAR **long_key); +BOOL is_switch(const WCHAR *s, const WCHAR c); /* add.c */ int reg_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty,
1
0
0
0
Huw Davies : riched20: Move scrollbar initialisation out of WM_CREATE.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 0ad8011723cf00b0ea4e28ac7424f9dc1dbbbdf7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0ad8011723cf00b0ea4e28ac…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 18 08:30:10 2021 +0000 riched20: Move scrollbar initialisation out of WM_CREATE. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 43 ++++++++++++++----------------------------- dlls/riched20/tests/editor.c | 10 ---------- dlls/riched20/txthost.c | 6 ++++-- 3 files changed, 18 insertions(+), 41 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 2ef277d9801..2ae97e1818b 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3019,6 +3019,20 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->horz_si.nPage = 0; ed->horz_si.nPos = 0; + if (ed->scrollbars & ES_DISABLENOSCROLL) + { + if (ed->scrollbars & WS_VSCROLL) + { + ITextHost_TxSetScrollRange( texthost, SB_VERT, 0, 1, TRUE ); + ITextHost_TxEnableScrollBar( texthost, SB_VERT, ESB_DISABLE_BOTH ); + } + if (ed->scrollbars & WS_HSCROLL) + { + ITextHost_TxSetScrollRange( texthost, SB_HORZ, 0, 1, TRUE ); + ITextHost_TxEnableScrollBar( texthost, SB_HORZ, ESB_DISABLE_BOTH ); + } + } + ed->wheel_remain = 0; list_init( &ed->reobj_list ); @@ -3160,33 +3174,6 @@ static void ME_SetText(ME_TextEditor *editor, void *text, BOOL unicode) ME_EndToUnicode(codepage, wszText); } -static LRESULT ME_WmCreate( ME_TextEditor *editor ) -{ - INT max; - - max = (editor->scrollbars & ES_DISABLENOSCROLL) ? 1 : 0; - if (~editor->scrollbars & ES_DISABLENOSCROLL || editor->scrollbars & WS_VSCROLL) - ITextHost_TxSetScrollRange(editor->texthost, SB_VERT, 0, max, TRUE); - - if (~editor->scrollbars & ES_DISABLENOSCROLL || editor->scrollbars & WS_HSCROLL) - ITextHost_TxSetScrollRange(editor->texthost, SB_HORZ, 0, max, TRUE); - - if (editor->scrollbars & ES_DISABLENOSCROLL) - { - if (editor->scrollbars & WS_VSCROLL) - { - ITextHost_TxEnableScrollBar(editor->texthost, SB_VERT, ESB_DISABLE_BOTH); - ITextHost_TxShowScrollBar(editor->texthost, SB_VERT, TRUE); - } - if (editor->scrollbars & WS_HSCROLL) - { - ITextHost_TxEnableScrollBar(editor->texthost, SB_HORZ, ESB_DISABLE_BOTH); - ITextHost_TxShowScrollBar(editor->texthost, SB_HORZ, TRUE); - } - } - return 0; -} - static LRESULT handle_EM_SETCHARFORMAT( ME_TextEditor *editor, WPARAM flags, const CHARFORMAT2W *fmt_in ) { CHARFORMAT2W fmt; @@ -3891,8 +3878,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, return (wParam >= 0x40000) ? 0 : MAKELONG( pt.x, pt.y ); } - case WM_CREATE: - return ME_WmCreate( editor ); case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: { diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 19a1af25f73..8ef88bd1b21 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -3109,11 +3109,9 @@ static void test_scrollbar_visibility(void) GetScrollInfo(hwndRichEdit, SB_VERT, &si); ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, "reported page/range is %d (%d..%d) expected 0 (0..100)\n", si.nPage, si.nMin, si.nMax); - } /* Ditto, see above */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, 0); @@ -3123,11 +3121,9 @@ static void test_scrollbar_visibility(void) GetScrollInfo(hwndRichEdit, SB_VERT, &si); ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, "reported page/range is %d (%d..%d) expected 0 (0..100)\n", si.nPage, si.nMin, si.nMax); - } /* Ditto, see above */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); @@ -3137,11 +3133,9 @@ static void test_scrollbar_visibility(void) GetScrollInfo(hwndRichEdit, SB_VERT, &si); ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, "reported page/range is %d (%d..%d) expected 0 (0..100)\n", si.nPage, si.nMin, si.nMax); - } /* Ditto, see above */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a\na"); @@ -3151,11 +3145,9 @@ static void test_scrollbar_visibility(void) GetScrollInfo(hwndRichEdit, SB_VERT, &si); ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, "reported page/range is %d (%d..%d) expected 0 (0..100)\n", si.nPage, si.nMin, si.nMax); - } /* Ditto, see above */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, 0); @@ -3165,11 +3157,9 @@ static void test_scrollbar_visibility(void) GetScrollInfo(hwndRichEdit, SB_VERT, &si); ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, "reported page/range is %d (%d..%d) expected 0 (0..100)\n", si.nPage, si.nMin, si.nMax); - } SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); SendMessageA(hwndRichEdit, WM_SETTEXT, 0, 0); diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 6834be684f9..5797046317c 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -63,6 +63,10 @@ static void host_init_props( struct host *host ) style = GetWindowLongW( host->window, GWL_STYLE ); + /* text services assumes the scrollbars are originally not shown, so hide them. + However with ES_DISABLENOSCROLL it'll immediately show them, so don't bother */ + if (!(style & ES_DISABLENOSCROLL)) ShowScrollBar( host->window, SB_BOTH, FALSE ); + host->scrollbars = style & (WS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_DISABLENOSCROLL); if (style & WS_VSCROLL) host->scrollbars |= ES_AUTOVSCROLL; @@ -989,8 +993,6 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, } ITextServices_TxSetText( host->text_srv, textW ); if (lparam) ME_EndToUnicode( codepage, textW ); - - hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, lparam, &res ); break; } case WM_DESTROY:
1
0
0
0
Huw Davies : riched20: Handle WM_SETCURSOR in the host.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 887ffec967e6693d99f682a8cd991ba22b14d3a2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=887ffec967e6693d99f682a8…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 18 08:30:09 2021 +0000 riched20: Handle WM_SETCURSOR in the host. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 139 +++++++++++++++--------------------------------- dlls/riched20/editor.h | 4 +- dlls/riched20/txthost.c | 17 +++++- dlls/riched20/txtsrv.c | 17 ++++-- 4 files changed, 74 insertions(+), 103 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=887ffec967e6693d99f6…
1
0
0
0
Huw Davies : riched20: Don't set the cursor during mouse messages.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: cd5b064af8c82c182525967d3e98a81962f06367 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cd5b064af8c82c182525967d…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 18 08:30:08 2021 +0000 riched20: Don't set the cursor during mouse messages. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index f7d383c2f10..fe22554327f 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3954,7 +3954,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, ITextHost_TxSetCapture(editor->texthost, TRUE); editor->bMouseCaptured = TRUE; ME_LinkNotify(editor, msg, wParam, lParam); - if (!ME_SetCursor(editor)) goto do_default; break; } case WM_MOUSEMOVE: @@ -3962,9 +3961,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_MouseMove(editor, (short)LOWORD(lParam), (short)HIWORD(lParam)); else ME_LinkNotify(editor, msg, wParam, lParam); - /* Set cursor if mouse is captured, since WM_SETCURSOR won't be received. */ - if (editor->bMouseCaptured) - ME_SetCursor(editor); break; case WM_LBUTTONUP: if (editor->bMouseCaptured) { @@ -3975,7 +3971,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, editor->nSelectionType = stPosition; else { - ME_SetCursor(editor); ME_LinkNotify(editor, msg, wParam, lParam); } break;
1
0
0
0
Huw Davies : riched20: Handle EM_SETPASSWORDCHAR in the host.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 06fb9c7f4c6949057ac6e167ef6d3bfc74cf07e9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=06fb9c7f4c6949057ac6e167…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 18 08:30:07 2021 +0000 riched20: Handle EM_SETPASSWORDCHAR in the host. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 16 +++------------- dlls/riched20/editstr.h | 2 +- dlls/riched20/paint.c | 4 ++-- dlls/riched20/run.c | 12 ++++++------ dlls/riched20/txthost.c | 20 ++++++++++++++++++-- dlls/riched20/txtsrv.c | 7 +++++++ dlls/riched20/wrap.c | 2 +- 7 files changed, 38 insertions(+), 25 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 3073294bd7b..f7d383c2f10 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2375,7 +2375,7 @@ static BOOL copy_or_cut( ME_TextEditor *editor, BOOL cut ) int start_cursor = ME_GetSelectionOfs( editor, &offs, &count ); ME_Cursor *sel_start = &editor->pCursors[start_cursor]; - if (editor->cPasswordMask) return FALSE; + if (editor->password_char) return FALSE; count -= offs; hr = editor_copy_or_cut( editor, cut, sel_start, count, NULL ); @@ -3041,9 +3041,9 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) else ed->selofs = 0; ed->nSelectionType = stPosition; - ed->cPasswordMask = 0; + ed->password_char = 0; if (ed->props & TXTBIT_USEPASSWORD) - ITextHost_TxGetPasswordChar(texthost, &ed->cPasswordMask); + ITextHost_TxGetPasswordChar( texthost, &ed->password_char ); ed->bWordWrap = (ed->props & TXTBIT_WORDWRAP) && (ed->props & TXTBIT_MULTILINE); @@ -4217,10 +4217,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, return 1; return 0; } - case EM_GETPASSWORDCHAR: - { - return editor->cPasswordMask; - } case EM_SETOLECALLBACK: if(editor->lpOleCallback) IRichEditOleCallback_Release(editor->lpOleCallback); @@ -4274,12 +4270,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, editor->mode = (editor->mode & ~mask) | changes; return 0; } - case EM_SETPASSWORDCHAR: - { - editor->cPasswordMask = wParam; - ME_RewrapRepaint(editor); - return 0; - } case EM_SETTARGETDEVICE: if (wParam == 0) { diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 0273fde4350..df07923548d 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -416,7 +416,7 @@ typedef struct tagME_TextEditor int mode; BOOL bHideSelection; BOOL AutoURLDetect_bEnable; - WCHAR cPasswordMask; + WCHAR password_char; BOOL bHaveFocus; /*for IME */ int imeStartIndex; diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 8ef5ada5855..607ced52089 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -333,9 +333,9 @@ static void draw_text( ME_Context *c, ME_Run *run, int x, int y, BOOL selected, && !(CFE_AUTOBACKCOLOR & run->style->fmt.dwEffects) ) ); - if (c->editor->cPasswordMask) + if (c->editor->password_char) { - masked = ME_MakeStringR( c->editor->cPasswordMask, run->len ); + masked = ME_MakeStringR( c->editor->password_char, run->len ); text = masked->szData; } diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index e099c0be6dc..bc282b20a57 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -543,9 +543,9 @@ int ME_CharFromPointContext(ME_Context *c, int cx, ME_Run *run, BOOL closest, BO return closest ? cp + trailing : cp; } - if (c->editor->cPasswordMask) + if (c->editor->password_char) { - mask_text = ME_MakeStringR( c->editor->cPasswordMask, run->len ); + mask_text = ME_MakeStringR( c->editor->password_char, run->len ); str = mask_text->szData; } else @@ -626,9 +626,9 @@ int ME_PointFromCharContext(ME_Context *c, ME_Run *pRun, int nOffset, BOOL visua if (visual_order && pRun->script_analysis.fRTL) x = pRun->nWidth - x - 1; return x; } - if (c->editor->cPasswordMask) + if (c->editor->password_char) { - mask_text = ME_MakeStringR(c->editor->cPasswordMask, pRun->len); + mask_text = ME_MakeStringR( c->editor->password_char, pRun->len ); str = mask_text->szData; } else @@ -678,9 +678,9 @@ SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run *run, i { size.cx = run->nWidth; } - else if (c->editor->cPasswordMask) + else if (c->editor->password_char) { - ME_String *szMasked = ME_MakeStringR(c->editor->cPasswordMask,nLen); + ME_String *szMasked = ME_MakeStringR( c->editor->password_char, nLen ); ME_GetTextExtent(c, szMasked->szData, nLen,run->style, &size); ME_DestroyString(szMasked); } diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index ebccddf65e3..beb2e423089 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -50,6 +50,7 @@ struct host DWORD props, scrollbars, event_mask; RECT client_rect, set_rect; COLORREF back_colour; + WCHAR password_char; }; static const ITextHostVtbl textHostVtbl; @@ -114,6 +115,7 @@ struct host *host_create( HWND hwnd, CREATESTRUCTW *cs, BOOL emulate_10 ) SetRectEmpty( &texthost->set_rect ); GetClientRect( hwnd, &texthost->client_rect ); texthost->use_back_colour = 0; + texthost->password_char = (texthost->props & TXTBIT_USEPASSWORD) ? '*' : 0; return texthost; } @@ -381,8 +383,10 @@ DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetScrollBars( ITextHost *ifa DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetPasswordChar,8) DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetPasswordChar( ITextHost *iface, WCHAR *c ) { - *c = '*'; - return S_OK; + struct host *host = impl_from_ITextHost( iface ); + + *c = host->password_char; + return *c ? S_OK : S_FALSE; } DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetAcceleratorPos,8) @@ -1058,6 +1062,10 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, else hr = get_lineA( host->text_srv, wparam, lparam, &res ); break; + case EM_GETPASSWORDCHAR: + ITextHost_TxGetPasswordChar( &host->ITextHost_iface, (WCHAR *)&res ); + break; + case EM_GETRECT: hr = ITextHost_TxGetClientRect( &host->ITextHost_iface, (RECT *)lparam ); break; @@ -1208,6 +1216,14 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, hr = set_options( host, wparam, lparam, &res ); break; + case EM_SETPASSWORDCHAR: + if (wparam == host->password_char) break; + host->password_char = wparam; + if (wparam) host->props |= TXTBIT_USEPASSWORD; + else host->props &= ~TXTBIT_USEPASSWORD; + ITextServices_OnTxPropertyBitsChange( host->text_srv, TXTBIT_USEPASSWORD, host->props & TXTBIT_USEPASSWORD ); + break; + case EM_SETREADONLY: { DWORD op = wparam ? ECOOP_OR : ECOOP_AND; diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 9cf1908b4de..e86a8936531 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -390,6 +390,13 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxPropertyBitsChange( ITextServic if (SUCCEEDED( hr )) repaint = TRUE; } + if (mask & TXTBIT_USEPASSWORD) + { + if (bits & TXTBIT_USEPASSWORD) ITextHost_TxGetPasswordChar( services->host, &services->editor->password_char ); + else services->editor->password_char = 0; + repaint = TRUE; + } + if (repaint) ME_RewrapRepaint( services->editor ); return S_OK; diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 0ca70b8a8ad..dcda041d773 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -829,7 +829,7 @@ static void ME_WrapTextParagraph( ME_TextEditor *editor, ME_Context *c, ME_Parag para_num_init( c, para ); /* For now treating all non-password text as complex for better testing */ - if (!c->editor->cPasswordMask /* && + if (!c->editor->password_char /* && ScriptIsComplex( tp->member.para.text->szData, tp->member.para.text->nLen, SIC_COMPLEX ) == S_OK */) { if (SUCCEEDED( itemize_para( c, para ) ))
1
0
0
0
Huw Davies : riched20: Handle EM_SETBKGNDCOLOR in the host.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: b927bc8d99e658d5c0d0af943010f38e984baab6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b927bc8d99e658d5c0d0af94…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Mar 18 08:30:06 2021 +0000 riched20: Handle EM_SETBKGNDCOLOR in the host. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 26 -------------------------- dlls/riched20/editstr.h | 2 -- dlls/riched20/txthost.c | 26 ++++++++++++++++++++++---- 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 13a04a003f4..3073294bd7b 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3005,8 +3005,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->nLastTotalLength = ed->nTotalLength = 0; ed->nLastTotalWidth = ed->nTotalWidth = 0; ed->nUDArrowX = -1; - ed->rgbBackColor = -1; - ed->hbrBackground = GetSysColorBrush(COLOR_WINDOW); ed->nEventMask = 0; ed->nModifyStep = 0; ed->nTextLimit = TEXT_LIMIT_DEFAULT; @@ -3100,8 +3098,6 @@ void ME_DestroyEditor(ME_TextEditor *editor) if (editor->pFontCache[i].hFont) DeleteObject(editor->pFontCache[i].hFont); } - if (editor->rgbBackColor != -1) - DeleteObject(editor->hbrBackground); if(editor->lpOleCallback) IRichEditOleCallback_Release(editor->lpOleCallback); if (editor->reOle) @@ -3516,28 +3512,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, } case EM_SELECTIONTYPE: return ME_GetSelectionType(editor); - case EM_SETBKGNDCOLOR: - { - LRESULT lColor; - if (editor->rgbBackColor != -1) { - DeleteObject(editor->hbrBackground); - lColor = editor->rgbBackColor; - } - else lColor = ITextHost_TxGetSysColor(editor->texthost, COLOR_WINDOW); - - if (wParam) - { - editor->rgbBackColor = -1; - editor->hbrBackground = GetSysColorBrush(COLOR_WINDOW); - } - else - { - editor->rgbBackColor = lParam; - editor->hbrBackground = CreateSolidBrush(editor->rgbBackColor); - } - ITextHost_TxInvalidateRect(editor->texthost, NULL, TRUE); - return lColor; - } case EM_GETMODIFY: return editor->nModifyStep == 0 ? 0 : -1; case EM_SETMODIFY: diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 1f277cbf6bc..0273fde4350 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -392,8 +392,6 @@ typedef struct tagME_TextEditor int nAvailWidth; /* 0 = wrap to client area, else wrap width in twips */ int nUDArrowX; int total_rows; - COLORREF rgbBackColor; - HBRUSH hbrBackground; int nEventMask; int nModifyStep; struct list undo_stack; diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index c80263bbd69..ebccddf65e3 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -45,9 +45,11 @@ struct host unsigned int sel_bar : 1; unsigned int client_edge : 1; unsigned int use_set_rect : 1; + unsigned int use_back_colour : 1; PARAFORMAT2 para_fmt; DWORD props, scrollbars, event_mask; RECT client_rect, set_rect; + COLORREF back_colour; }; static const ITextHostVtbl textHostVtbl; @@ -111,6 +113,7 @@ struct host *host_create( HWND hwnd, CREATESTRUCTW *cs, BOOL emulate_10 ) texthost->use_set_rect = 0; SetRectEmpty( &texthost->set_rect ); GetClientRect( hwnd, &texthost->client_rect ); + texthost->use_back_colour = 0; return texthost; } @@ -346,6 +349,9 @@ DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetParaFormat( ITextHost *ifa DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetSysColor,8) DECLSPEC_HIDDEN COLORREF __thiscall ITextHostImpl_TxGetSysColor( ITextHost *iface, int index ) { + struct host *host = impl_from_ITextHost( iface ); + + if (index == COLOR_WINDOW && host->use_back_colour) return host->back_colour; return GetSysColor( index ); } @@ -992,9 +998,14 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, { HDC hdc = (HDC)wparam; RECT rc; + HBRUSH brush; if (GetUpdateRect( editor->hWnd, &rc, TRUE )) - FillRect( hdc, &rc, editor->hbrBackground ); + { + brush = CreateSolidBrush( ITextHost_TxGetSysColor( &host->ITextHost_iface, COLOR_WINDOW ) ); + FillRect( hdc, &rc, brush ); + DeleteObject( brush ); + } return 1; } case EM_FINDTEXT: @@ -1127,13 +1138,13 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, HDC hdc; RECT rc; PAINTSTRUCT ps; - HBRUSH old_brush; + HBRUSH brush = CreateSolidBrush( ITextHost_TxGetSysColor( &host->ITextHost_iface, COLOR_WINDOW ) ); update_caret( editor ); hdc = BeginPaint( editor->hWnd, &ps ); if (!editor->bEmulateVersion10 || (editor->nEventMask & ENM_UPDATE)) ME_SendOldNotify( editor, EN_UPDATE ); - old_brush = SelectObject( hdc, editor->hbrBackground ); + brush = SelectObject( hdc, brush ); /* Erase area outside of the formatting rectangle */ if (ps.rcPaint.top < editor->rcFormat.top) @@ -1166,7 +1177,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, } ME_PaintContent( editor, hdc, &ps.rcPaint ); - SelectObject( hdc, old_brush ); + DeleteObject( SelectObject( hdc, brush ) ); EndPaint( editor->hWnd, &ps ); return 0; } @@ -1181,6 +1192,13 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, res = len; break; } + case EM_SETBKGNDCOLOR: + res = ITextHost_TxGetSysColor( &host->ITextHost_iface, COLOR_WINDOW ); + host->use_back_colour = !wparam; + if (host->use_back_colour) host->back_colour = lparam; + InvalidateRect( hwnd, NULL, TRUE ); + break; + case EM_SETEVENTMASK: host->event_mask = lparam; hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, lparam, &res );
1
0
0
0
Zebediah Figura : server: Remove a no longer relevant "see below" from a comment.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 4c0a69f5865c37c2693813670433381c4737a40a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c0a69f5865c37c269381367…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 18 00:41:27 2021 -0500 server: Remove a no longer relevant "see below" from a comment. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/protocol.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/protocol.def b/server/protocol.def index 03161c830c0..2bfdcca6de1 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1114,7 +1114,7 @@ typedef struct obj_handle_t dst_process; /* dst process handle */ unsigned int access; /* wanted access rights */ unsigned int attributes; /* object attributes */ - unsigned int options; /* duplicate options (see below) */ + unsigned int options; /* duplicate options */ @REPLY obj_handle_t handle; /* duplicated handle in dst process */ int self; /* is the source the current process? */
1
0
0
0
Zebediah Figura : server: Fix a copy-paste error in a comment.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 9922b5210b906b8b61c4899f8286e75b0b72b22e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9922b5210b906b8b61c4899f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 18 00:41:26 2021 -0500 server: Fix a copy-paste error in a comment. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/protocol.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/protocol.def b/server/protocol.def index a5790cda939..03161c830c0 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -668,7 +668,7 @@ typedef union } map_view; struct { - enum apc_type type; /* APC_MAP_VIEW */ + enum apc_type type; /* APC_UNMAP_VIEW */ unsigned int status; /* status returned by call */ } unmap_view; struct
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
117
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200