Module: wine
Branch: master
Commit: 7e94a230e1e6afc3cd7d41865b8d6eeda8d86580
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e94a230e1e6afc3cd7d41865…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com>
Date: Mon Dec 15 04:31:52 2008 -0500
richedit: Removed unused hwndEdit variable for the RTF parser.
There is no reason for the rich text format parser to need a handle to
the window, and even if there were it has a handle to the editor which
contains a handle to the window. It is better to remove this
considering we need to cut down on the use of window handles to
implement windowless richedit controls.
---
dlls/riched20/editor.c | 1 -
dlls/riched20/rtf.h | 3 ---
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 16f2771..55bc9b8 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1470,7 +1470,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
memset(&parser, 0, sizeof parser);
RTFSetEditStream(&parser, &inStream);
parser.rtfFormat = format&(SF_TEXT|SF_RTF);
- parser.hwndEdit = editor->hWnd;
parser.editor = editor;
parser.style = style;
WriterInit(&parser);
diff --git a/dlls/riched20/rtf.h b/dlls/riched20/rtf.h
index 8fc8abc..a276b7c 100644
--- a/dlls/riched20/rtf.h
+++ b/dlls/riched20/rtf.h
@@ -1157,9 +1157,6 @@ struct _RTF_Info {
ME_InStream *stream;
- /* edit window to output to */
- HWND hwndEdit;
-
ME_TextEditor *editor;
ME_Style *style;
Module: wine
Branch: master
Commit: 8ab0570d0247de4e24596cf2dea5962e51139cf2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8ab0570d0247de4e24596cf2d…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com>
Date: Mon Dec 15 04:31:25 2008 -0500
richedit: Removed an unnecessary call to GetScrollInfo.
The vertical scrollbar state is stored internally within the control,
so should be used when possible. This will become more necessary when
windowless richedit controls are implemented, and there will no hWnd
to pass to GetScrollInfo.
---
dlls/riched20/editor.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 0d3010a..16f2771 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3545,9 +3545,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
pt.x += editor->selofs;
pt.x++; /* for some reason native offsets x by one */
- si.cbSize = sizeof(si);
- si.fMask = SIF_POS;
- if (GetScrollInfo(editor->hWnd, SB_VERT, &si)) pt.y -= si.nPos;
+ pt.y -= editor->vert_si.nPos;
si.cbSize = sizeof(si);
si.fMask = SIF_POS;
if (GetScrollInfo(editor->hWnd, SB_HORZ, &si)) pt.x -= si.nPos;
Module: wine
Branch: master
Commit: 0c8e4b6d02b0cd9faf835f7eaa4efacfe547e585
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0c8e4b6d02b0cd9faf835f7ea…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com>
Date: Mon Dec 15 04:32:01 2008 -0500
richedit: Compare editor rather than hWnd in ME_CalculateClickCount.
Comparing the editor as apposed to the handle to the window will work
just as well right now, but will also work when there is no window
handle to make a comparison with, which will be the case with
windowless richedit controls.
---
dlls/riched20/editor.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 49f5740..0d3010a 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2182,7 +2182,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
/* Process the message and calculate the new click count.
*
* returns: The click count if it is mouse down event, else returns 0. */
-static int ME_CalculateClickCount(HWND hWnd, UINT msg, WPARAM wParam,
+static int ME_CalculateClickCount(ME_TextEditor *editor, UINT msg, WPARAM wParam,
LPARAM lParam)
{
static int clickNum = 0;
@@ -2204,7 +2204,9 @@ static int ME_CalculateClickCount(HWND hWnd, UINT msg, WPARAM wParam,
{
static MSG prevClickMsg;
MSG clickMsg;
- clickMsg.hwnd = hWnd;
+ /* Compare the editor instead of the hwnd so that the this
+ * can still be done for windowless richedit controls. */
+ clickMsg.hwnd = (HWND)editor;
clickMsg.message = msg;
clickMsg.wParam = wParam;
clickMsg.lParam = lParam;
@@ -3596,7 +3598,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
return 0;
SetFocus(hWnd);
ME_LButtonDown(editor, (short)LOWORD(lParam), (short)HIWORD(lParam),
- ME_CalculateClickCount(hWnd, msg, wParam, lParam));
+ ME_CalculateClickCount(editor, msg, wParam, lParam));
SetCapture(hWnd);
ME_LinkNotify(editor,msg,wParam,lParam);
if (!ME_SetCursor(editor)) goto do_default;