[PATCH 3/3] user32: The flag EF_APP_HAS_HANDLE is now obsolete
Detlef Riekenberg
wine.dev at web.de
Fri May 3 02:22:45 CDT 2013
Huw wrote the code. He also has no knowledge of a programm,
which depends on the handle from EM_SETHANDLE to be always
valid and is accessing the buffer without EM_GETHANDLE.
--
By by ... Detlef
---
dlls/user32/edit.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index d9e2ff9..b65d509 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -79,9 +79,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
#define EF_AFTER_WRAP 0x0080 /* the caret is displayed after the last character of a
wrapped line, instead of in front of the next character */
#define EF_USE_SOFTBRK 0x0100 /* Enable soft breaks in text. */
-#define EF_APP_HAS_HANDLE 0x0200 /* Set when an app sends EM_[G|S]ETHANDLE. We are in sole control of
- the text buffer if this is clear. */
-#define EF_DIALOGMODE 0x0400 /* Indicates that we are inside a dialog window */
+#define EF_DIALOGMODE 0x0200 /* Indicates that we are inside a dialog window */
typedef enum
{
@@ -1298,7 +1296,6 @@ static void EDIT_LockBuffer(EDITSTATE *es)
}
else es->text = LocalLock(es->hloc32W);
}
- if(es->flags & EF_APP_HAS_HANDLE) text_buffer_changed(es);
es->lock_count++;
}
@@ -2497,8 +2494,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
/* The text buffer handle belongs to the app */
es->hlocapp = hLocal;
- /* The app has knowledge of the text buffer handle */
- es->flags |= EF_APP_HAS_HANDLE;
+
TRACE("Returning %p, LocalSize() = %ld\n", hLocal, LocalSize(hLocal));
return hLocal;
}
@@ -2841,9 +2837,9 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
/* The text buffer handle belongs to the control */
es->hlocapp = NULL;
- /* The app has knowledge of the text buffer handle */
- es->flags |= EF_APP_HAS_HANDLE;
+
EDIT_LockBuffer(es);
+ text_buffer_changed(es);
es->x_offset = es->y_offset = 0;
es->selection_start = es->selection_end = 0;
--
1.7.5.4
More information about the wine-patches
mailing list