Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6162703f
Commit
6162703f
authored
Mar 17, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Handle ES_WANTRETURN in the host.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7a038cae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
editor.c
dlls/riched20/editor.c
+2
-2
txthost.c
dlls/riched20/txthost.c
+7
-3
No files found.
dlls/riched20/editor.c
View file @
6162703f
...
...
@@ -3408,7 +3408,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case
EM_GETOPTIONS
:
{
/* these flags are equivalent to the ES_* counterparts */
DWORD
mask
=
ECO_
WANTRETURN
|
ECO_
SELECTIONBAR
;
DWORD
mask
=
ECO_SELECTIONBAR
;
DWORD
settings
=
editor
->
styleFlags
&
mask
;
return
settings
;
...
...
@@ -3459,7 +3459,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
/* these flags are equivalent to ES_* counterparts, except for
* ECO_AUTOWORDSELECTION that doesn't have an ES_* counterpart,
* but is still stored in editor->styleFlags. */
const
DWORD
mask
=
ECO_
WANTRETURN
|
ECO_
SELECTIONBAR
;
const
DWORD
mask
=
ECO_SELECTIONBAR
;
DWORD
settings
=
mask
&
editor
->
styleFlags
;
DWORD
oldSettings
=
settings
;
DWORD
changedSettings
;
...
...
dlls/riched20/txthost.c
View file @
6162703f
...
...
@@ -41,6 +41,7 @@ struct host
HWND
window
,
parent
;
unsigned
int
emulate_10
:
1
;
unsigned
int
dialog_mode
:
1
;
unsigned
int
want_return
:
1
;
PARAFORMAT2
para_fmt
;
DWORD
props
,
scrollbars
,
event_mask
;
};
...
...
@@ -71,6 +72,8 @@ static void host_init_props( struct host *host )
if
(
style
&
ES_NOOLEDRAGDROP
)
host
->
props
|=
TXTBIT_DISABLEDRAG
;
if
(
!
(
host
->
scrollbars
&
ES_AUTOHSCROLL
))
host
->
props
|=
TXTBIT_WORDWRAP
;
host
->
want_return
=
!!
(
style
&
ES_WANTRETURN
);
}
struct
host
*
host_create
(
HWND
hwnd
,
CREATESTRUCTW
*
cs
,
BOOL
emulate_10
)
...
...
@@ -698,7 +701,6 @@ static BOOL create_windowed_editor( HWND hwnd, CREATESTRUCTW *create, BOOL emula
IUnknown_Release
(
unk
);
host
->
editor
->
exStyleFlags
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
host
->
editor
->
styleFlags
|=
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
ES_WANTRETURN
;
host
->
editor
->
hWnd
=
hwnd
;
/* FIXME: Remove editor's dependence on hWnd */
host
->
editor
->
hwndParent
=
create
->
hwndParent
;
...
...
@@ -772,7 +774,7 @@ static HRESULT set_options( struct host *host, DWORD op, DWORD value, LRESULT *r
DWORD
mask
=
ECO_AUTOWORDSELECTION
|
ECO_AUTOVSCROLL
|
ECO_AUTOHSCROLL
|
ECO_NOHIDESEL
|
ECO_READONLY
|
ECO_WANTRETURN
|
ECO_SAVESEL
|
ECO_SELECTIONBAR
|
ECO_VERTICAL
;
const
DWORD
host_mask
=
ECO_AUTOWORDSELECTION
|
ECO_AUTOVSCROLL
|
ECO_AUTOHSCROLL
|
ECO_NOHIDESEL
|
ECO_READONLY
|
ECO_SAVESEL
|
ECO_VERTICAL
;
ECO_
WANTRETURN
|
ECO_
SAVESEL
|
ECO_VERTICAL
;
HRESULT
hr
=
S_OK
;
...
...
@@ -831,6 +833,7 @@ static HRESULT set_options( struct host *host, DWORD op, DWORD value, LRESULT *r
host
->
props
^=
TXTBIT_VERTICAL
;
props_mask
|=
TXTBIT_VERTICAL
;
}
if
(
change
&
ECO_WANTRETURN
)
host
->
want_return
^=
1
;
if
(
props_mask
)
ITextServices_OnTxPropertyBitsChange
(
host
->
text_srv
,
props_mask
,
host
->
props
&
props_mask
);
...
...
@@ -853,7 +856,7 @@ static BOOL handle_dialog_enter( struct host *host )
if
(
ctrl_is_down
)
return
TRUE
;
if
(
host
->
editor
->
styleFlags
&
ES_WANTRETURN
)
return
FALSE
;
if
(
host
->
want_return
)
return
FALSE
;
if
(
host
->
parent
)
{
...
...
@@ -1022,6 +1025,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
if
(
host
->
props
&
TXTBIT_VERTICAL
)
res
|=
ECO_VERTICAL
;
if
(
host
->
scrollbars
&
ES_AUTOHSCROLL
)
res
|=
ECO_AUTOHSCROLL
;
if
(
host
->
scrollbars
&
ES_AUTOVSCROLL
)
res
|=
ECO_AUTOVSCROLL
;
if
(
host
->
want_return
)
res
|=
ECO_WANTRETURN
;
break
;
case
WM_GETTEXT
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment